-
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
New node API endpoints for transactions pool #4231
Conversation
Txs by sender api
Last nonce in pool for sender endpoint
Codecov Report
@@ Coverage Diff @@
## rc/2022-july #4231 +/- ##
===============================================
Coverage ? 73.69%
===============================================
Files ? 662
Lines ? 85880
Branches ? 0
===============================================
Hits ? 63289
Misses ? 17836
Partials ? 4755 Continue to review full report at Codecov.
|
…e code duplicate and for further improvements
…ble to request only some data
Nonce gaps endpoint
Merge rc/july into development (3 July)
Tx pool API improvements
…_feat_new_tx_api_2022.07.05 # Conflicts: # api/errors/errors.go # api/mock/facadeStub.go # api/shared/interface.go # facade/interface.go # facade/mock/apiResolverStub.go # facade/nodeFacade_test.go # integrationTests/interface.go # node/external/transactionAPI/apiTransactionProcessor.go # node/external/transactionAPI/apiTransactionProcessor_test.go # node/mock/apiTransactionHandlerStub.go
…x_api_2022.07.05 Merge dev into feat new tx api 2022.07.05
…_into_feat_new_tx_api_2022.07.07
…ew_tx_api_2022.07.07 Merge rc july into feat new tx api 2022.07.07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ Log scanner @@
feat/new-tx-api
================================================================================
- Known Warnings 13
- New Warnings 0
- Known Errors 0
- New Errors 0
- Panics 0
================================================================================
system test + scenario passed
…_into_feat_new_tx_api_2022.07.08
…ew_tx_api_2022.07.08 Merge rc july into feat new tx api 2022.07.08
…_into_feat_new_tx_api_2022.07.08_p2
…ew_tx_api_2022.07.08_p2 Merge rc july into feat new tx api 2022.07.08 p2
New endpoints:
/transaction/pool
- to get all hashes from pool/transaction/pool?fields=sender,receiver,gaslimit,gasprice,data,value,receiverusername
to get the specified fields for all transactions in pool. They are optional and hashes will be default./transaction/pool?last-nonce=true
- error/transaction/pool?nonce-gaps=true
- error/transaction/pool?fields + &last-nonce/&nonce-gaps
- error/transaction/pool?by-sender=erd1....
- to get all hashes from pool for a specific sender/transaction/pool?by-sender=erd1...&last-nonce=true
- to get last nonce from pool for a specific sender/transaction/pool?by-sender=erd1...&nonce-gaps=true
to get any nonce gaps from pool for a specific sender/transaction/pool?by-sender=erd1...&fields=sender,receiver,gaslimit,gasprice,data,value,receiverusername
to get the specified fields for all transactions in pool for a specific sender They are optional and hashes will be default./transaction/pool?by-sender=erd1...&fields + &last-nonce/&nonce-gaps
- errorIn 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 one. (badNonce scenario is used to create nonce gaps and fill the tx pool)node/config/walletKey.pem
(local testnet) one of the private keys and paste it intocmd/txgen/config/walletKey.Pem
nonce-gaps
: alterbadNonceSecnario.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-accounts --num-accounts 10
./scripts/badNonce.sh
/transaction/pool?fields=sender
to get all txs from pool with the sender info, then use one of those addresses.