-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: configurable fastnode (#13321)
(cherry picked from commit 412e2fc) # Conflicts: # CHANGELOG.md # fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go # go.mod # go.sum # server/config/config.go # server/config/toml.go # simapp/go.mod # simapp/go.sum # store/rootmulti/store.go # tests/go.mod # tests/go.sum
- Loading branch information
1 parent
128922c
commit 81a67c3
Showing
23 changed files
with
3,383 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//go:build gofuzz || go1.18 | ||
|
||
package tests | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
iavlproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl" | ||
"github.com/cosmos/iavl" | ||
db "github.com/tendermint/tm-db" | ||
) | ||
|
||
type serialize struct { | ||
Data map[string][]byte | ||
Key string | ||
} | ||
|
||
func FuzzStoreInternalProofsCreateNonmembershipProof(f *testing.F) { | ||
f.Fuzz(func(t *testing.T, data []byte) { | ||
sz := new(serialize) | ||
if err := json.Unmarshal(data, sz); err != nil { | ||
return | ||
} | ||
if len(sz.Data) == 0 || len(sz.Key) == 0 { | ||
return | ||
} | ||
tree, err := iavl.NewMutableTree(db.NewMemDB(), 0, false) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
for k, v := range sz.Data { | ||
tree.Set([]byte(k), v) | ||
} | ||
icp, err := iavlproofs.CreateNonMembershipProof(tree, []byte(sz.Key)) | ||
if err != nil { | ||
return | ||
} | ||
if icp == nil { | ||
panic("nil CommitmentProof with nil error") | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.