Closed yihuang closed 2 months ago
The changes modify the sendtx
function by removing the w3
parameter and initializing a new instance of web3.Web3
within the function. This establishes a connection to a local Ethereum node at "http://localhost:8545" and retrieves the chain ID for inclusion in the transaction parameters. These adjustments ensure that transactions are correctly associated with the intended blockchain network.
Files | Change Summary |
---|---|
testground/benchmark/benchmark/sendtx.py |
Modified the sendtx function to remove the w3 parameter, connect to a local Ethereum node, and include the chain ID in transactions. |
sequenceDiagram
participant User
participant sendtx
participant Web3
participant EthereumNode
User->>sendtx: Call sendtx(acct, tx_amount)
sendtx->>Web3: Initialize connection to http://localhost:8545
Web3->>EthereumNode: Connect to Ethereum node
sendtx->>Web3: Retrieve chain_id
Web3->>sendtx: Return chain_id
sendtx->>EthereumNode: Send transaction with chainId
EthereumNode-->>sendtx: Confirm transaction
sendtx-->>User: Return transaction result
๐
In the meadow where transactions flow,
A rabbit hops, with a cheerful glow.
With a nod to the chain, and a wink to the node,
Sending bytes on a vibrant road.
Hooray for the changes, letโs dance and play,
For Ethereum's magic is here to stay!
๐ผ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 15.24%. Comparing base (
eb0a15d
) to head (20b1cb3
). Report is 20 commits behind head on main.
fixed with asyncio: https://github.com/crypto-org-chain/cronos/pull/1587
it might limit the concurrent performance
Solution:
it seems improve a bit locally here, can you try to reproduce the improvement? @mmsqe
๐ฎ๐ป๐ฎ๐ป๐ฎ๐ป !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! ๐ฎ๐ป๐ฎ๐ป๐ฎ๐ป
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
New Features
Bug Fixes