Skip to content
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

Protocol: VM Bytecode Commitment circuit #3152

Closed
Tracked by #3109
iAmMichaelConnor opened this issue Oct 31, 2023 · 0 comments
Closed
Tracked by #3109

Protocol: VM Bytecode Commitment circuit #3152

iAmMichaelConnor opened this issue Oct 31, 2023 · 0 comments
Assignees
Labels
A-documentation Area: relates to documentation A-protocol Area: relates to designing / explaining the protocol

Comments

@iAmMichaelConnor
Copy link
Contributor

iAmMichaelConnor commented Oct 31, 2023

This is a tricky one, because the VM opcodes haven't been finalised, yet. Nevertheless, it would be great if we could understand the logic and assertions that this circuit will need to make.

When a public function is deployed, its bytecode is broadcast to the network. But there are currently no checks to ensure the broadcasted bytecode actually relates to the function tree root that's embedded in the contract's address. This could be a possible griefing attack for sequencers. They might be requested to execute a function of a contract, lookup the bytecode that was broadcast at the time the contract was deployed, only to discover the bytecode is irrelevant. This realisation might take too much time (e.g. the sequencer might need to hash or commit to the bytecode, and then check it against the contract's function tree). TODO: check if this would indeed take too much time, and that this is indeed a possible griefing attack vector.

To address this problem, a circuit could be executed at the time of deployment, to prove that the broadcast bytecode relates to the function tree, e.g. by committing to the bytecode, and showing that the resulting commitment is contained within a leaf of the function tree.

@github-project-automation github-project-automation bot moved this to Todo in A3 Oct 31, 2023
@iAmMichaelConnor iAmMichaelConnor added A-documentation Area: relates to documentation A-protocol Area: relates to designing / explaining the protocol labels Oct 31, 2023
@iAmMichaelConnor iAmMichaelConnor added this to the 📝 Protocol Description milestone Oct 31, 2023
@dbanks12 dbanks12 assigned zac-williamson and unassigned dbanks12 Nov 21, 2023
@iAmMichaelConnor iAmMichaelConnor moved this from Todo to In Review in A3 Dec 11, 2023
@dbanks12 dbanks12 closed this as completed Jan 2, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in A3 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: relates to documentation A-protocol Area: relates to designing / explaining the protocol
Projects
Archived in project
Development

No branches or pull requests

3 participants