Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Circuit for opcode TIMESTAMP #307

Merged

Conversation

scroll-dev
Copy link
Collaborator

@scroll-dev scroll-dev commented Jan 25, 2022

Implement the TimestampGadget for opcode TIMESTAMP.

Specs: scroll-tech/zkevm-specs#31

Other changes:

  • Use StackOnlyOpcode::<0> for COINBASE bus mapping.
  • Change mock block author address to a non-default value, so that it doesn't match the value in a default BlockContext.

@github-actions github-actions bot added crate-bus-mapping Issues related to the bus-mapping workspace member T-opcode Type: opcode-related and focused PR/Issue labels Jan 25, 2022
@ed255 ed255 self-requested a review January 27, 2022 09:54
Copy link
Member

@ed255 ed255 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please take a look at the note I wrote about using cb.query_rlc().

Also let's wait for privacy-scaling-explorations/zkevm-specs#105 to be merged before merging this PR

@@ -111,8 +110,8 @@ fn fn_gen_associated_ops(opcode_id: &OpcodeId) -> FnGenAssociatedOps {
// OpcodeId::RETURNDATACOPY => {},
// OpcodeId::EXTCODEHASH => {},
// OpcodeId::BLOCKHASH => {},
OpcodeId::COINBASE => Coinbase::gen_associated_ops,
// OpcodeId::TIMESTAMP => {},
OpcodeId::COINBASE => StackOnlyOpcode::<0>::gen_associated_ops,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! :)

@barryWhiteHat barryWhiteHat added benchmarks: ALL Triggers a long running prover benchmark and removed benchmarks: ALL Triggers a long running prover benchmark labels Jan 31, 2022
@z2trillion z2trillion force-pushed the feat/opcode-timestamp branch from 9463dc9 to 7518c31 Compare February 1, 2022 15:40
@z2trillion z2trillion force-pushed the feat/opcode-timestamp branch from 6a10996 to f83788a Compare February 1, 2022 17:30
@icemelon
Copy link
Collaborator

icemelon commented Feb 2, 2022

@ed255 Could you take a look again?

@ed255 ed255 merged commit 4732717 into privacy-scaling-explorations:main Feb 2, 2022
@ed255
Copy link
Member

ed255 commented Feb 2, 2022

Thanks for the work!

@icemelon icemelon deleted the feat/opcode-timestamp branch February 3, 2022 18:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crate-bus-mapping Issues related to the bus-mapping workspace member T-opcode Type: opcode-related and focused PR/Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants