Skip to content

Add effectiveGasPrice to eth_getTransactionReceipt#206

Merged
timbeiko merged 1 commit intoethereum:masterfrom
lightclient:effective-tip
Jun 11, 2021
Merged

Add effectiveGasPrice to eth_getTransactionReceipt#206
timbeiko merged 1 commit intoethereum:masterfrom
lightclient:effective-tip

Conversation

@lightclient
Copy link
Member

@lightclient lightclient commented Jun 1, 2021

After some discussions, it appears most prefer to add effectiveGasPrice to the receipt object because it is a computed value, like gasUsed. I've written the method with the idea that legacy transactions will simply return tx.gas_price for the effectiveGasPrice and EIP-1559 txs will actually compute the correct value. This should avoid a scenario where RPC consumers need to branch depending on the tx type to determine the effective cost.

cc: @MicahZoltu @tkstanczak @timbeiko @GregTheGreek @fvictorio

@lightclient lightclient marked this pull request as ready for review June 2, 2021 15:57
@lightclient
Copy link
Member Author

lightclient commented Jun 7, 2021

@timbeiko seems like there hasn't been any push back on this. Do you want to go ahead and merge or should we bring it up briefly in ACD?

EDIT: sorry, we should probably discuss on ACD briefly. I see geth uses the effectiveGasPrice as the gasPrice for mined txs.

@lightclient
Copy link
Member Author

Per ACD, we'll no longer return effectiveGasPrice as gasPrice in London txs. It will only compute and return the value in the receipt object.

@karalabe
Copy link
Member

It's not fully clear to me what gasPrice should return now for 1559 txs? Should it be set to 0? Should it be completely omitted? Seems a bit dangerous to drop straight away and any code depending on gasPrice will insta-break. Should we perhaps keep it synonymous to effectiveGasPrice in the receipt and call it deprecated until people switch over?

@karalabe
Copy link
Member

Also worth noting that digging up a receipt is expensive and if you only want to get the price paid, it's a bit of an overkill to do a database lookup just to get a field that doesn't even need any data whatsoever from the receipt.

@MicahZoltu
Copy link

MicahZoltu commented Jun 17, 2021

I like dropping it. We will likely continue to have more and more new transaction types over time, and not all of them will be able to backfill old properties with reasonable values. If we backfill this time around, people won't write code that is resilient to future transaction changes and they will break in the future rather than today.

Given that there are probably (hopefully) more future Ethereum dapp/integration developers than there are today Ethereum dapp/integration developers, I would rather break today users than future users (e.g., train them now, while it is less damaging).

danceratopz added a commit to danceratopz/execution-specs that referenced this pull request Oct 22, 2025
* Add support for Besu

Adds support for Besu using the `t8n-server` command.  This command
avoids the Java startup penalties and provides similar performance to
other clients.  Support for "cleanup" tasks is added, in this case to
terminate the t8n-server process for Besu.

* tests: use chain_id 1 and set protected based on fork

* style: clean-up indentation/line-wrapping

* fix: use a timeout in post request to fail test in case of t8n error

* refactor: don't make shutdown an abstract method

* fix: exit with error if the besu t8n tool is ran with xdist -n>0

---------

Co-authored-by: danceratopz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants