0xPolygonHermez / cdk-erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
35 stars 36 forks source link

[Sequencer] - fake receipt for OOC transaction #776

Open hexoscott opened 3 months ago

hexoscott commented 3 months ago

If you send a transaction that causes an OOC you are never able to get a receipt for this. We need a mechanism to produce a fake receipt and share it with RPC nodes (or at lease the one that made the initial request), or alternatively check on the eth_sendRawTransaction call for an OOC by executing the transaction based on current state in the RPC before passing it to the sequencer for processing.

Sharonbc01 commented 1 month ago

Hi @hexoscott can you check if this issue still needs to be resolved or if it can be closed now. Thanks

hexoscott commented 1 month ago

Afaik we still need this, or something like this

Sharonbc01 commented 1 month ago

Okay thanks @hexoscott , can you please review with @mandrigin and action. Keen to get any required last features in asap so we can thoroughly test with time on cardona assuming upgrade goes well tomorrow.

I like the approach to check for an OOG scenario earlier—during the eth_sendRawTransaction call itself but of course you guys know best!

kstoykov commented 1 month ago

There is work in progress regarding this one: https://github.com/0xPolygonHermez/cdk-erigon/pull/1016

Sharonbc01 commented 1 month ago

Hi @kstoykov can you provide an ETA on this please?

kstoykov commented 1 month ago

Hi @kstoykov can you provide an ETA on this please?

I'm waiting for more information as mentioned in the PR 1016.

hexoscott commented 1 month ago

Just checking back in on this one @kstoykov @mandrigin. We recently made a change to ensure that an OOC transaction doesn't get automatically rejected the 2nd time it is submitted. With that in mind do we want fake receipts or not? The 2nd submission might not OOC because the world state has changed since the last submission and the TX will have the same hash.

I'm thinking we either don't want fake receipts or we need to make the transaction handling process a little more complex and check for these fake receipts and delete them every time a transaction is submitted if a fake receipt already exists for it.

Sharonbc01 commented 1 month ago

@mandrigin Agreed to removed for mainnet milestone

Sharonbc01 commented 1 week ago

@mandrigin do we require this for RC1?