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

chore(pkg/trie): Create standalone trie package #3658

Merged
merged 43 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b23251e
feat(pkg/trie): Add basic structures
dimartiro Jan 3, 2024
af43f27
feat(pkg/trie): Add recorder interface
dimartiro Jan 3, 2024
e2baf3f
feat(pkg/trie): Finish recorder impl and add node codec and layout
dimartiro Jan 3, 2024
1fd7346
fix(pkg/trie): fix recorder drain method
dimartiro Jan 3, 2024
509b51d
feat(pkg/trie): Add lookup
dimartiro Jan 3, 2024
3e5e018
feat(pkg/trie): Add insert and remove methods
dimartiro Jan 8, 2024
4188cec
feat(pkg/trie): Add license
dimartiro Jan 8, 2024
c8c277f
Merge branch 'development' of https://github.com/ChainSafe/gossamer i…
dimartiro Jan 8, 2024
f597bf8
feat(pkg/trie): fixes and implements lookup and cache
dimartiro Jan 8, 2024
1dd1f13
feat(pkg/trie): Implements remove inspector
dimartiro Jan 10, 2024
0fd4c49
Fixes and insert inspector
dimartiro Jan 10, 2024
811638d
feat(pkg/trie): Implements fix nodes method
dimartiro Jan 11, 2024
490185f
feat(pkg/trie): NibbleSlice tests
dimartiro Jan 11, 2024
869f9b1
chore(pkg/trie): Add missing licenses
dimartiro Jan 11, 2024
09a119d
Merge branch 'development' of https://github.com/ChainSafe/gossamer i…
dimartiro Jan 11, 2024
4b7fc53
Merge branch 'development' of https://github.com/ChainSafe/gossamer i…
dimartiro Jan 11, 2024
d57528c
feat(pkg/trie): Implements keccak hasher
dimartiro Jan 11, 2024
c292d8a
refa(pkg/trie): Simplify generics
dimartiro Jan 12, 2024
b18dc65
feat(pkg/trie): Implements memoryDB
dimartiro Jan 15, 2024
3f5d116
fix(pkg/trie): fixes and add missing license
dimartiro Jan 15, 2024
f2617aa
Merge branch 'development' of https://github.com/ChainSafe/gossamer i…
dimartiro Jan 15, 2024
6addce7
fix(pkg/trie): Fix lookup depth
dimartiro Jan 15, 2024
4e604d2
feat(pkg/trie): Adds memorydb tests
dimartiro Jan 16, 2024
70df09d
fix(pkg/trie): Node from encoded and cache lookup
dimartiro Jan 17, 2024
60c86dd
refactor(pkg/trie): Split node handle from normal node
dimartiro Jan 18, 2024
222980c
feat(pkg/trie): Introduce node plan
dimartiro Jan 18, 2024
bf6dde0
fix(pkg/trie): Fix lookup
dimartiro Jan 18, 2024
8f226cb
chore(pkg/trie): Removes unnecesary generic from Node
dimartiro Jan 18, 2024
b5408b6
fix(pkg/trie): Fix some impl for substrate NodeCodec
dimartiro Jan 18, 2024
e7cf51a
Merge branch 'development' of https://github.com/ChainSafe/gossamer i…
dimartiro Jan 18, 2024
fec33a0
fix(pkg/trie): Add missing license
dimartiro Jan 18, 2024
64616ab
feat(pkg/trie): Decode header and docs
dimartiro Jan 18, 2024
0306d8d
refactor(pkg/trie): Better node header decoding
dimartiro Jan 18, 2024
a460cd1
fix(pkg/trie): fix lookup break for
dimartiro Feb 1, 2024
4ac436d
chore(pkg/trie): Add standalone trie pkg
dimartiro Feb 14, 2024
a0474ca
Merge branch 'development' of https://github.com/ChainSafe/gossamer i…
dimartiro Feb 14, 2024
8d55a15
fix(pkg/trie): imports
dimartiro Feb 14, 2024
09e8bba
fix(ci): Update tests path
dimartiro Feb 14, 2024
1735095
chore(pkg/trie): fix comment
dimartiro Feb 14, 2024
cb6247d
chore(deps): Remove unnecesary dependencies
dimartiro Feb 14, 2024
4eadc2f
fix(ci): Update fuzz test path
dimartiro Feb 14, 2024
f5d713b
Merge branch 'development' into diego/pkg/trie
dimartiro Feb 16, 2024
e351c39
Merge branch 'development' into diego/pkg/trie
dimartiro Feb 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(pkg/trie): fix comment
dimartiro committed Feb 14, 2024
commit 17350953e652ca2ffb32fce69ca679ab8d01f988
6 changes: 3 additions & 3 deletions pkg/trie/node/branch_encode.go
Original file line number Diff line number Diff line change
@@ -41,9 +41,9 @@ var parallelEncodingRateLimit = make(chan struct{}, parallelLimit)

// encodeChildrenOpportunisticParallel encodes children in parallel eventually.
// Leaves are encoded in a blocking way, and branches are encoded in separate
// goroutines IF they are less than the parallelLimit number of goroutines al.y
// running. This is designed to limit the total number of goroutines in order to
// avoid using too much memory on the stack.
// goroutines IF they are less than the parallelLimit number of goroutines
// already running. This is designed to limit the total number of goroutines in
// order to avoid using too much memory on the stack.
func encodeChildrenOpportunisticParallel(children []*Node, maxInlineValue int, buffer io.Writer) (err error) {
// Buffered channels since children might be encoded in this
// goroutine or another one.