Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTQ rpc call, v3.18.0 again #1776

Merged
merged 9 commits into from
Jan 10, 2024

Conversation

dimalit
Copy link
Contributor

@dimalit dimalit commented Jan 5, 2024

Note: in results, transactions belonging to same sender go together, ordered by nonce increase. In case of FTQ overflow, last transaction from 1st sender will be dropped.

Testing:

1 JsonRpcSuite/mtm_import_future_txs

2 Manual testing sequence:

  1. Add balance for your account to skaled's config.
  2. Run skaled with --enable-debug-behavior-apis
  3. Send transaction with too big nonce.
  4. Send curl -X POST --data '{"id":4,"jsonrpc":"2.0","method":"debug_getFutureTransactions","params":[]}'
  5. See your transaction.
  6. Repeat the same without --enable-debug-behavior-apis, METHOD_NOT_FOUND error should be returned.

Example answer:

{
   "id":4,
   "jsonrpc":"2.0",
   "result":[
      {
         "from":"0xf15f970e370486d5137461c5936dc6019898e6c8",
         "gas":"0x5208",
         "gasPrice":"0x186a0",
         "hash":"0xf075c0d864e4eb73218480b83ff231a74846acaf58136f310f2241fd4e8beb8b",
         "nonce":"0x14",
         "r":"0x5d18118a4f1d559af9bcd6728066da2b1786ae6acd9d3785a93b2561706f2f48",
         "s":"0x29e5a3fef45fd3d606aeac4e602eeb7389d50af6f708179b226eed5252e702d9",
         "sighash":"0xa075eb68e97bd62f14315ccd9faab3d0c3119db609a997e568c52387042ffae7",
         "to":"0xf15f970e370486d5137461c5936dc6019898e6c8",
         "v":"0x1",
         "value":"0x0"
      }
   ]
}

Example error:
{"error":{"code":-32601,"message":"METHOD_NOT_FOUND: The method being requested is not available on this server"},"id":4,"jsonrpc":"2.0"}

@dimalit dimalit linked an issue Jan 5, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (a93c503) 45.56% compared to head (1e79fdf) 45.56%.
Report is 4 commits behind head on v3.18.0.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           v3.18.0    #1776      +/-   ##
===========================================
- Coverage    45.56%   45.56%   -0.01%     
===========================================
  Files          358      356       -2     
  Lines        51807    51762      -45     
===========================================
- Hits         23608    23584      -24     
+ Misses       28199    28178      -21     

@dimalit dimalit marked this pull request as ready for review January 5, 2024 18:16
Copy link
Collaborator

@DmytroNazarenko DmytroNazarenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please, add unit test
  2. Update description with information about tx sorting

@olehnikolaiev olehnikolaiev self-requested a review January 10, 2024 15:18
@DmytroNazarenko DmytroNazarenko merged commit 026d174 into v3.18.0 Jan 10, 2024
8 checks passed
@DmytroNazarenko DmytroNazarenko deleted the enhancement/SKALED-1431-ftq-rpc-call branch January 10, 2024 21:26
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2024
@dimalit
Copy link
Contributor Author

dimalit commented Jan 11, 2024

UPD For some reason, test_stop.py::test_double_stop functional test fails on this branch. When trying to reproduce it locally - everything works ok. So, probably, this should be test problem, not build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tool to get list of transactions from future transaction queue
3 participants