-
Notifications
You must be signed in to change notification settings - Fork 197
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
Nonce gaps endpoint #4234
Merged
Merged
Nonce gaps endpoint #4234
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e code duplicate and for further improvements
dragos-rebegea
previously approved these changes
Jun 29, 2022
ssd04
reviewed
Jun 29, 2022
ssd04
approved these changes
Jun 29, 2022
dragos-rebegea
approved these changes
Jun 29, 2022
Codecov Report
@@ Coverage Diff @@
## feat/new-tx-api #4234 +/- ##
==================================================
Coverage ? 75.88%
==================================================
Files ? 645
Lines ? 85413
Branches ? 0
==================================================
Hits ? 64814
Misses ? 15795
Partials ? 4804 Continue to review full report at Codecov.
|
sstanculeanu
added
the
ignore-for-release-notes
Do not include item in release notes
label
Aug 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
"/pool/by-sender/nonce-gaps/:sender"
txCache
returns a slice of entire wrapped transactions which have all the info needed(hashes, nonces, etc)apiTransactionProcessor
In order to test the changes, the following steps are needed:
elrond-txgen-go
and update the following:cmd/txgen/config/config.toml
, leaveScenarios = ["badNonce"]
, updateProxyServerURL
with the port that your local proxy uses, optional updateMintingValue
to a smaller onenode/config/walletKey.pem
(local testnet) one of the private keys and paste it intocmd/txgen/config/walletKey.Pem
badNonceSecnario.go
file,HandleTransaction
method in order to always send bad nonces with gaps(eg. on line 62 you can useb.sendersMap[tx.Sender] = nonceToUse + 3
)cd /cmd/txgen
,go build
and start txgen./txgen --new-account --num-accounts 10
http://127.0.0.1:node-port/transaction/pool
to get tx poolhttp://127.0.0.1:node-port/transaction/your-hash
http://127.0.0.1:node-port/transaction/pool/by-sender/nonce-gaps/your-sender
(if the provided alter example is used, one who tests should see many gaps of 3 nonces)