Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
E3 agg commitment (#647)
Browse files Browse the repository at this point in the history
* added commitment to aggregator

* added commitment evaluation by updates, fixed mainnet roothash mismatch

* added ability to change starting state of hph

* replayable erigon23 with commitment

* possible fix for eliasfano index read after close

* fixed db pruning and restart

* Initial fixes

* Debug

* clear downHashedLen for branch nodes

* Fix key length, cleanup

* Cleanup

* Cleanup

* picked aggregator updates

* fixed empty cell hash for ProcessUpdate evaluation

* hashBuffer moved from Cell to HexPatriciaHashed

* fixed codeHash incorrect renewal

* lint

* removed valuemergefn from history

* fixed lint

* fixed test

* rewritten fuzz test on hph

* fix for Win tests - do not remove tmp dir after test

* win

* fixup after merge

* close aggregator after test

Co-authored-by: Alexey Sharp <[email protected]>
Co-authored-by: Alex Sharp <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2022
1 parent 7790688 commit 4f52325
Show file tree
Hide file tree
Showing 16 changed files with 2,005 additions and 457 deletions.
7 changes: 7 additions & 0 deletions commitment/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ func (branchData BranchData) IsComplete() bool {

// MergeHexBranches combines two branchData, number 2 coming after (and potentially shadowing) number 1
func (branchData BranchData) MergeHexBranches(branchData2 BranchData, newData []byte) (BranchData, error) {
if branchData2 == nil {
return branchData, nil
}
if branchData == nil {
return branchData2, nil
}

touchMap1 := binary.BigEndian.Uint16(branchData[0:])
afterMap1 := binary.BigEndian.Uint16(branchData[2:])
bitmap1 := touchMap1 & afterMap1
Expand Down
Loading

0 comments on commit 4f52325

Please sign in to comment.