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

Custom MMR IDs #18

Merged
merged 50 commits into from
Jul 19, 2024
Merged

Custom MMR IDs #18

merged 50 commits into from
Jul 19, 2024

Conversation

fmkra
Copy link
Member

@fmkra fmkra commented May 24, 2024

Added support for creating MMRs with custom IDs provided as an argument to functions create_branch_*.

NOTICE: Calling create_branch_from with mmr_id = 0, creates brand new mmr with size 1 and element equal to hash of brave new world string. Because of that mmr_id = 0 is reserved and can be only used in create_branch_from function; in other functions it panics.

NOTICE 2: Since absence of MMR in map is indicated by root having value 0, it would be impossible to distinguish no MMR and MMR with root 0 which could allow malicious user to overwrite existing MMR. Therefore, root = 0 is not allowed anywhere.

Moved contracts from l1 folder to herodotus-evm repository.

@fmkra fmkra merged commit e4d1665 into develop Jul 19, 2024
2 checks passed
@fmkra fmkra deleted the adjustments-ids branch July 19, 2024 09:11
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.

3 participants