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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
restore-keys: ${{ runner.os }}-go-mod

- name: Fuzz trie
run: go test -run Fuzz_Trie_PutAndGet_Single -fuzz=Fuzz_Trie_PutAndGet_Single -fuzztime=5m github.com/ChainSafe/gossamer/lib/trie
run: go test -run Fuzz_Trie_PutAndGet_Single -fuzz=Fuzz_Trie_PutAndGet_Single -fuzztime=5m github.com/ChainSafe/gossamer/pkg/trie
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ jobs:

- name: Trie memory test
run: |
sed -i 's/const skip = true/const skip = false/g' ./lib/trie/mem_test.go
go test -run ^Test_Trie_MemoryUsage$ ./lib/trie
sed -i 's/const skip = false/const skip = true/g' ./lib/trie/mem_test.go
sed -i 's/const skip = true/const skip = false/g' ./pkg/trie/mem_test.go
go test -run ^Test_Trie_MemoryUsage$ ./pkg/trie
sed -i 's/const skip = false/const skip = true/g' ./pkg/trie/mem_test.go

- name: Test - Race
run: make test-using-race-detector
Expand Down
2 changes: 1 addition & 1 deletion cmd/gossamer/commands/import_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"

"github.com/ChainSafe/gossamer/dot"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/core/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/ChainSafe/gossamer/lib/runtime"
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion dot/core/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"

cscale "github.com/centrifuge/go-substrate-rpc-client/v4/scale"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
Expand Down
2 changes: 1 addition & 1 deletion dot/core/service_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/core/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
cscale "github.com/centrifuge/go-substrate-rpc-client/v4/scale"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
Expand Down
2 changes: 1 addition & 1 deletion dot/digest/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/genesis"
runtime "github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ChainSafe/gossamer/dot/state"
"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"

"github.com/ChainSafe/gossamer/internal/log"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/import_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/internal/log"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/node_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/ChainSafe/gossamer/lib/keystore"
"github.com/ChainSafe/gossamer/lib/runtime"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
gomock "go.uber.org/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/ChainSafe/gossamer/lib/grandpa"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
)

// StorageAPI is the interface for the storage state
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/ChainSafe/gossamer/lib/grandpa"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
)

// StorageAPI is the interface for the storage state
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/author_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/ChainSafe/gossamer/lib/runtime/storage"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
cscale "github.com/centrifuge/go-substrate-rpc-client/v4/scale"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/chain_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/runtime"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
"go.uber.org/mock/gomock"

rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/childstate_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/internal/database"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/childstate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
apimocks "github.com/ChainSafe/gossamer/dot/rpc/modules/mocks"
"github.com/ChainSafe/gossamer/lib/common"
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"go.uber.org/mock/gomock"

"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/dev_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ChainSafe/gossamer/lib/keystore"
"github.com/ChainSafe/gossamer/lib/runtime"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/mocks/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dot/rpc/modules/mocks_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dot/rpc/modules/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
)

// StateGetReadProofRequest json fields
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/state_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ChainSafe/gossamer/dot/rpc/modules/mocks"
"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"

"github.com/ChainSafe/gossamer/dot/rpc/modules/mocks"
testdata "github.com/ChainSafe/gossamer/dot/rpc/modules/test_data"
Expand Down
2 changes: 1 addition & 1 deletion dot/rpc/modules/system_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/ChainSafe/gossamer/lib/runtime"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/transaction"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion dot/state/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/state/block_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/state/block_finalisation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion dot/state/block_race_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/internal/database"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"go.uber.org/mock/gomock"

"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion dot/state/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/ChainSafe/gossamer/internal/database"
"github.com/ChainSafe/gossamer/lib/blocktree"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/ChainSafe/gossamer/pkg/trie"
"go.uber.org/mock/gomock"

"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion dot/state/grandpa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/ChainSafe/gossamer/lib/crypto/ed25519"
"github.com/ChainSafe/gossamer/lib/crypto/sr25519"
"github.com/ChainSafe/gossamer/lib/keystore"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/gtank/merlin"
"go.uber.org/mock/gomock"

Expand Down
2 changes: 1 addition & 1 deletion dot/state/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/utils"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion dot/state/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/ChainSafe/gossamer/lib/runtime"
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
wazero_runtime "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
)

// Initialise initialises the genesis state of the DB using the given storage trie.
Expand Down
4 changes: 2 additions & 2 deletions dot/state/mocks_database_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dot/state/mocks_generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ package state
//go:generate mockgen -destination=mocks_runtime_test.go -package $GOPACKAGE github.com/ChainSafe/gossamer/lib/runtime Instance
//go:generate mockgen -destination=mock_gauge_test.go -package $GOPACKAGE github.com/prometheus/client_golang/prometheus Gauge
//go:generate mockgen -destination=mock_counter_test.go -package $GOPACKAGE github.com/prometheus/client_golang/prometheus Counter
//go:generate mockgen -destination=mocks_database_test.go -package=$GOPACKAGE github.com/ChainSafe/gossamer/lib/trie/db Database
//go:generate mockgen -destination=mocks_database_test.go -package=$GOPACKAGE github.com/ChainSafe/gossamer/pkg/trie/db Database
2 changes: 1 addition & 1 deletion dot/state/offline_pruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/ChainSafe/gossamer/internal/database"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
)

// OfflinePruner is a tool to prune the stale state with the help of
Expand Down
2 changes: 1 addition & 1 deletion dot/state/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/ChainSafe/gossamer/internal/log"
"github.com/ChainSafe/gossamer/internal/metrics"
"github.com/ChainSafe/gossamer/lib/blocktree"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
)

var logger = log.NewFromGlobal(
Expand Down
2 changes: 1 addition & 1 deletion dot/state/service_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ChainSafe/gossamer/internal/log"
"github.com/ChainSafe/gossamer/lib/common"
runtime "github.com/ChainSafe/gossamer/lib/runtime/storage"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/pkg/trie"
"go.uber.org/mock/gomock"

"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions dot/state/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ChainSafe/gossamer/internal/database"
"github.com/ChainSafe/gossamer/lib/common"
rtstorage "github.com/ChainSafe/gossamer/lib/runtime/storage"
"github.com/ChainSafe/gossamer/lib/trie"
"github.com/ChainSafe/gossamer/lib/trie/proof"
"github.com/ChainSafe/gossamer/pkg/trie"
"github.com/ChainSafe/gossamer/pkg/trie/proof"
)

// storagePrefix storage key prefix.
Expand Down
Loading
Loading