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

Readme file for the world state package #436

Merged
merged 4 commits into from
May 3, 2023
Merged

Conversation

PhilWindle
Copy link
Collaborator

Description

This PR adds a readme to the world state package.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • The branch has been merged or rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

lgtm, minor typos in suggestions


The synchroniser's role is to periodically poll for new block information and reconcile that information with the current state of the Merkle Trees.

Onc a new block is received, the synchroniser checks the uncommitted root values of all of the trees against the roots published as part of the block. If they are all equal, the tree state is committed. If they are not equal, the tree states are rolled back to the last committed state before the published data is inserted and committed.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Onc a new block is received, the synchroniser checks the uncommitted root values of all of the trees against the roots published as part of the block. If they are all equal, the tree state is committed. If they are not equal, the tree states are rolled back to the last committed state before the published data is inserted and committed.
Once a new block is received, the synchroniser checks the uncommitted root values of all of the trees against the roots published as part of the block. If they are all equal, the tree state is committed. If they are not equal, the tree states are rolled back to the last committed state before the published data is inserted and committed.


### The Merkle Tree Interface

The interface to the Merkle Tree DB offers a unified asynchronous API to the set of trees available. Reads from the Merkle Trees need to be marked as to whether they should include uncommitted state. For this reason, the MerkleTreeOperationsFacade exist to abstract this details away from the end consumer.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The interface to the Merkle Tree DB offers a unified asynchronous API to the set of trees available. Reads from the Merkle Trees need to be marked as to whether they should include uncommitted state. For this reason, the MerkleTreeOperationsFacade exist to abstract this details away from the end consumer.
The interface to the Merkle Tree DB offers a unified asynchronous API to the set of trees available. Reads from the Merkle Trees need to be marked as to whether they should include uncommitted state. For this reason, the MerkleTreeOperationsFacade exists to abstract this details away from the end consumer.

@PhilWindle PhilWindle changed the title Readme file for the worl state package Readme file for the world state package May 3, 2023
@PhilWindle PhilWindle merged commit 8b8e9a0 into master May 3, 2023
@PhilWindle PhilWindle deleted the pw/world-state-readme branch May 3, 2023 12:58
ludamad added a commit that referenced this pull request May 3, 2023
* partial import refactor commit

* partial import refactor commit

* partial import refactor commit

* add new export to foundation, partial import refactor

* partial import reformat

* add DebugLogger import

* adjust additional imports

* L1 contracts: readme + docker update (#422)

* chore: readme + docker update

* Apply suggestions from code review

Co-authored-by: Maddiaa <47148561+cheethas@users.noreply.github.com>

---------

Co-authored-by: Maddiaa <47148561+cheethas@users.noreply.github.com>

* feat: l1 to l2 messaging (#385)

* feat: initial decoder contact changes

* feat: add message snapshot to l2 block

* feat(world_state): add l2 merkle tree

* feat: add l1ToL2 roots tree to ts

* feat: historic l2 tree in l2 block

* feat: add l1->l2 messages types to root rollup

* feat: add to circuit powered block builder

* feat: add types to root rollup inputs

* feat: update root rollup circuit

* feat: add l1tol2 messages to the rollup calldata

* soldoc

* fix: pedersen segfault issue

temp commented out

fix: pedersen segfault issue

* clean: fix native root tests

* Add messages hash test

* feat: stub l1_to_l2_messages in block builder

* fix: update snaphshots in circuits.js

* fix: activate sim tree checking in rollup builder

* fix: update snapshot

* feat: add l2 block utilities

* fix: rebase cpp build issues

* feat: update l1 contract after rebase

* fix: update ts tests

* chore: update viem scripts

* chore: update ethjs helpers

* fix

* feat: update decoder.t.sol

* fix: re skip `l2-block-publisher.test.ts`

* chore: clang tidy fix

* fix: clang tidy

* run prettier

* fix: remove done todos

* fix: re introduce test initialiser lost in merge

* fix: move custom typing to its own file in the sequencer

* fix: add negative tests, cleanup

* chore: forge fmt

* fix: rename updateRootsTree -> updateHistoricRootsTree

* fix: update contract doc comment

* fix: update cpp test and naming nits

* fix: update trailing mock

---------

Co-authored-by: cheethas <addaboy@gmail.com>

* Readme file for the world state package (#436)

* Readme file for the worl state package

* Review updates

* Review change

* Fixed linter errors + docs in archiver (#440)

* chore: enabled strict linter checks

* docs: fixed linting errors

* refactor: fixed inconsistent naming

* docs: updated readme

* Fixed linter errors + docs in types (#443)

* chore: enabled strict linter checks

* chore: fixed linter errors

* docs: udpated readme

* Pw/merkle tree readme (#441)

* Added readme file to Merkle Trees package

* Readme update

* update makeImport function ins ethereum.js

---------

Co-authored-by: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
Co-authored-by: Maddiaa <47148561+cheethas@users.noreply.github.com>
Co-authored-by: cheethas <addaboy@gmail.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
ludamad pushed a commit that referenced this pull request Jul 14, 2023
* feat(noir): add hash index to pedersen constraint

* feat: added pedesen with hash_index in header
codygunton pushed a commit that referenced this pull request Jan 23, 2024
* feat(noir): add hash index to pedersen constraint

* feat: added pedesen with hash_index in header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants