privacy-scaling-explorations / zkevm-specs

333 stars 272 forks source link

Add begin_tx and end_tx specs #512

Closed rrtoledo closed 6 months ago

rrtoledo commented 7 months ago

Adding markdown spec for begin_tx & end_tx gadgets

rrtoledo commented 7 months ago

There are notable differences between the python and the rs code (e.g. InvalidTx is used in python, precompiles are more handled in rust...). I'll set up a call to talk about these.

rrtoledo commented 6 months ago

We are handling invalidtx differently in the specs than in rust (where we do not handle them there in begin/end_tx). Should we update all specs to sync? I think Taiko was working on the rust's InvalidTx.

rrtoledo commented 6 months ago

There are differences between src/ and build/lib/, @ChihChengLiang pointed out that build/ is ignored, would it be worth deleting the folder?

rrtoledo commented 6 months ago

Precompiles are handled in rust but not in the specs, should we open an issue about it?

KimiWu123 commented 6 months ago

We are handling invalidtx differently in the specs than in rust (where we do not handle them there in begin/end_tx). Should we update all specs to sync? I think Taiko was working on the rust's InvalidTx.

We have invalid tx support in rust (https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/1677). The implementation is more comprehensive in rust. So, yes, we should update our specs to sync our circuit.

Precompiles are handled in rust but not in the specs, should we open an issue about it?

We have precompiles in the specs. The precompile gadgets in the specs should be more than in the circuit.

rrtoledo commented 6 months ago

We are handling invalidtx differently in the specs than in rust (where we do not handle them there in begin/end_tx). Should we update all specs to sync? I think Taiko was working on the rust's InvalidTx.

We have invalid tx support in rust (privacy-scaling-explorations/zkevm-circuits#1677). The implementation is more comprehensive in rust. So, yes, we should update our specs to sync our circuit.

Precompiles are handled in rust but not in the specs, should we open an issue about it?

We have precompiles in the specs. The precompile gadgets in the specs should be more than in the circuit.

I'll add the precompiles to the access list then!

rrtoledo commented 6 months ago

Updates:

rrtoledo commented 6 months ago

@KimiWu123 @ChihChengLiang Sorry for bothering you again but can you have another look as the PR changed a fair bit!