-
Notifications
You must be signed in to change notification settings - Fork 270
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
Align block structure with yellow paper #3533
Comments
The It should either be renamed, or consist of commitments to the actual blocks. Our apis which are mostly used for building the header should also be altered to return a |
From discussion earlier, we came up with a few structs and hopefully some better naming: // Base rollup only change part of the state
interface PartialStateReference {
noteHashTreeRoot: Snapshot;
nullifierTreeRoot: Snapshot;
contractTreeRoot: Snapshot;
publicDataTreeRoot: Fr;
};
// StateRoot = H(StateReference)
// Tree of StateRoots = Archive
interface StateReference {
...partialStateReference;
privateKernelVkTreeRoot: Snapshot;
l1ToL2MessageTreeRoot: Snapshot;
archiveRoot: Fr; // Before insertion of this leaf
globalVariablesHash: H(GlobalVariables);
};
interface CombinedConstantData {
historical_state: StateReference; // old header
context: TxContext;
};
interface BlockHeader {
parent: StateRoot;
state: StateReference;
globalVariables: GlobalVariables;
}
interface Block {
header: BlockHeader;
content: Content;
} Further, there are some cleanup to do regarding global variables which have multiple variations in noir which makes it hard to follow. |
As mentioned in #3564 it will also be useful to expose the block number as part of the state reference to make historic access easier. Practically, this could be done by not providing a |
Closing this as its subtasks have been addressed. |
The block as defined currently is very hard to follow. It uses different names all over the place to refer to the same things. We should use structs when possible, and be more consistent in the naming.
For example, the
L2Block
don't explicitly define the block header, so theBlockHeader
in typescript is not consistent with the actual block. It is only the "after" half of it.Instead, we must update it to match what is described in the yellow-paper.
Tasks
PartialStateReference
andStateReference
noir structs #3820Rollup
andL1Publisher
#3936Rollup.process
function to accept params according to yellow paper #4011BlockHeader
struct with the newHeader
#3937get_block_header
#4134The text was updated successfully, but these errors were encountered: