Skip to content

feat: Extend ConstantRollupData to include global variables #826

@LHerskind

Description

@LHerskind

Part of #824

The ConstantRollupData which is used in Base and Merge rollup circuits should be updated to include:

  • block.timestamp
  • block.number
  • chainid
  • version

To handle #705, the kernel should use its chainid as a public input, allowing us to have the Base rollup circuit check that both kernels have same chainid as the constant values.

The Merge rollup is checking that constants from both left and right child is the same, and forwarding the constants already, so no changes should be required there.

Small illustration below (showing only chainid but same for the other values).

Image

The root rollup requires minor changes to include the added values as part of the public inputs hash such that they can be anchored in data provided by the state transition contract.

Note that the state transition contract needs to update to include the extra values in public input computation. Note that the values in the L2 block should be constrained on L1 but that this should be done in separate issues, to not bloat this PR needlessly:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions