-
Notifications
You must be signed in to change notification settings - Fork 291
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
Effective gas price #4759
base: dev
Are you sure you want to change the base?
Effective gas price #4759
Conversation
9ddc0cd
to
c6faf4c
Compare
0bb2b32
to
e3a5dd6
Compare
@Frozen During my test, effectiveGasPrice field in the transaction receipt is still not available. I checked eth_getTransactionReceipt and hmy_getTransactionReceipt Please make sure the effectiveGasPrice is the same as the gasPrice |
a230a06
to
af35364
Compare
@Frozen hmyv1 and v2 APIs has the hex vs decimal difference see below {
"transaction-hash": "0x6ce7fd454c5c3e642a4573bd684f28acaf5f5478dddf56f1ec64c8808b57190a",
"blockchain-receipt": {
"blockHash": "0xfacba8e14ccd7ae0e066df602b49251a09bccd510597fa8f5c17b0859df493f0",
"blockNumber": "0x9",
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": 100000000000,
"from": "one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": "0x1",
"to": "one19zzwsxr0uf2fe34y8qkadek2v0eh6h5mg2deg6",
"transactionHash": "0x6ce7fd454c5c3e642a4573bd684f28acaf5f5478dddf56f1ec64c8808b57190a",
"transactionIndex": "0x0"
},
"time-signed-utc": "2024-09-30 08:17:36.579582"
} Also eth_getTransactionReceipt still doesn't have the field {
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xfacba8e14ccd7ae0e066df602b49251a09bccd510597fa8f5c17b0859df493f0",
"blockNumber": "0x9",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"from": "0x15a128e599b74842bccba860311efa92991bffb5",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x2884e8186fe2549cc6a4382dd6e6ca63f37d5e9b",
"transactionHash": "0xad611cd8342d244e74f64888309fdf819c23f308f425edbeee289492729ae47a",
"transactionIndex": "0x0"
}
} |
af35364
to
150f2f5
Compare
Fixed json hex view for "cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x17480", |
eth_getTransactionReceipt and the blockchain receipt generated by the hmy command during a transfer works now. Could you check hmy_getTransactionReceipt and hmyv2_getTransactionReceipt ? those would be the last ones that should require the field effectiveGasPrice |
it will be included in next release |
302422e
to
d308ae9
Compare
@Frozen hmy_getTransactionReceipt and hmy_getTransactionReceipt are good : {
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x29e06a818eb40489e346b41717f4b4f314ec06a67d9cdb7e0f721be8667cc402",
"blockNumber": "0x3",
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x174876e800",
"from": "one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": "0x1",
"to": "one1eenp9ujcrmyaq22ef6jrpry2k97tjz4xs6ppcf",
"transactionHash": "0x54e5a487016f05fa402b314c1e1aac397163863842c1914c3a3511a77e0cc838",
"transactionIndex": "0x0"
}
} eth: {
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x29e06a818eb40489e346b41717f4b4f314ec06a67d9cdb7e0f721be8667cc402",
"blockNumber": "0x3",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x174876e800",
"from": "0x15a128e599b74842bccba860311efa92991bffb5",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xce6612f2581ec9d029594ea4308c8ab17cb90aa6",
"transactionHash": "0x50fbac1de6df537d569cd24f962f08986800bcd3939a41144a072b0dcb6a7674",
"transactionIndex": "0x0"
}
} however hmyv2_getTransactionReceipt should return the result in decimal (non hex), it currently return an hex, see {
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x29e06a818eb40489e346b41717f4b4f314ec06a67d9cdb7e0f721be8667cc402",
"blockNumber": 3,
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": 21000,
"effectiveGasPrice": "0x174876e800",
"from": "one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur",
"gasUsed": 21000,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": 1,
"to": "one1eenp9ujcrmyaq22ef6jrpry2k97tjz4xs6ppcf",
"transactionHash": "0x54e5a487016f05fa402b314c1e1aac397163863842c1914c3a3511a77e0cc838",
"transactionIndex": 0
}
} |
hey @GheisMohammadi please review/approve this PR |
@Frozen thanks hmyv2 looks good now {
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x896cfee82ef9542433cdf392548ce519bb7d531eec9d018f26b39e29f0e055b0",
"blockNumber": 9,
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": 21000,
"effectiveGasPrice": 100000000000,
"from": "one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur",
"gasUsed": 21000,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": 1,
"to": "one19zzwsxr0uf2fe34y8qkadek2v0eh6h5mg2deg6",
"transactionHash": "0x6ce7fd454c5c3e642a4573bd684f28acaf5f5478dddf56f1ec64c8808b57190a",
"transactionIndex": 0
}
} |
hey @sunwavesun can you help review/approve the PR ? |
@mur-me we talked about the ci test failure in our previous meeting I've confirmed that our localnet is getting the effectiveGasPrice from transactionReceipt RPC : https://github.com/harmony-one/go-sdk/blob/master/cmd/subcommands/staking.go#L174 so the current branch on harmony-test is wrong like you said. |
RPC tests were updated, I'm trying to rerun them Link to the harmony-test PR - harmony-one/harmony-test#34 |
This PR address this issue by setting the effectiveGasPrice to the transaction gas price. It is not implementing the full EIP 1559.
EffectiveGasPrice
field added to TxRusult. Added json and rlp serialization tests.