Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Implement Taiko specific changes in the EVM circuit #122

Open
2 tasks
Brechtpd opened this issue Jun 27, 2023 · 2 comments
Open
2 tasks

Implement Taiko specific changes in the EVM circuit #122

Brechtpd opened this issue Jun 27, 2023 · 2 comments

Comments

@Brechtpd
Copy link

Some small changes need to be done in the EVM circuit to correctly support Taiko blocks. It would be great if we could do these changes behind a boolean switch isTaikoBlock: bool so we can still keep supporting normal Ethereum blocks as well (otherwise we may break a lot of testing against normal Ethereum blocks which wouldn't be great, those tests would still be very useful).

The changes are (from @smtmfft):

  • anchor no fee (base fee in anchor is 0), so there is no way to let legacy tx simulate 1559 as node rejects 0 gas_price. Then, we need to add such constraints in evm to make our evm match our chain.
  • burning becomes transfer, base_fee is paid in each tx, and the sum base_fee is transferred to burning account at the end of the block processing. That means intermediate balance of the burning account stays the same until the block ends.
@smtmfft
Copy link
Collaborator

smtmfft commented Jul 17, 2023

Just talked with @xiaodino , I think the geth compatible way legacy->1559 support does not make much sense, as in real net the legacy tx is really rare (maybe not none so far, but we can claim that it is not supported to make it none). Even we enabled such mode, now the only kind of block we can verify is a block contains a legacy anchor and a txlist with all legacy txs, which is nearly impossible. So, as we already consider discarding the legacy tx burden. Directly enabling 1559 (could be in parallel with legacy tx if we really want) in evm seems serve our final goal better.

@smtmfft
Copy link
Collaborator

smtmfft commented Jul 19, 2023

#112
Double checked with David, the burning happens in each tx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: 🫡 In review
Development

No branches or pull requests

3 participants