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

Problem: custom cache store impl not unified with sdk #446

Merged
merged 6 commits into from
Apr 2, 2024
Merged
Changes from 1 commit
Commits
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
update deps
yihuang committed Apr 2, 2024

Verified

This commit was signed with the committer’s verified signature.
yihuang yihuang
commit 42475b81ea975a47b7e3a174b6ebe7e386f0c787
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -241,12 +241,13 @@ require (
)

replace (
cosmossdk.io/store => github.com/yihuang/cosmos-sdk/store v0.0.0-20240401113147-37956eeb8606
// release/v0.50.x
cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240402015425-ec314e8e2d07
// use cosmos keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/cockroachdb/pebble => github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811
// release/v0.50.x
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240401080707-77efecc0520d
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240402015425-ec314e8e2d07
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -413,8 +413,10 @@ github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6
github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240401080707-77efecc0520d h1:i7NVRj8FFAcOzfTWLZ8G++qDTSR1fWnRwcTSuBZP/A0=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240401080707-77efecc0520d/go.mod h1:nRk8EA8/fEG4zSme2i/Rq5z3k7TrlsHkOYhrY79hhD8=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240402015425-ec314e8e2d07 h1:XVb9zfI9joZzroBIBiiopd1Un4hWf0Wq2/iLfWTpSY8=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240402015425-ec314e8e2d07/go.mod h1:nRk8EA8/fEG4zSme2i/Rq5z3k7TrlsHkOYhrY79hhD8=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240402015425-ec314e8e2d07 h1:LlaT9o3Fly1MGX4MRGa/UcwAQzl7tewjryyJ2xTV9jg=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240402015425-ec314e8e2d07/go.mod h1:lfuLI1f4o+0SGtlHQS4x5qsjRcZZfYqG8bp3k8hM0M8=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y=
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
@@ -1125,8 +1127,6 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yihuang/cosmos-sdk/store v0.0.0-20240401113147-37956eeb8606 h1:A7TTyvAtu7qYR+8AZ5Bb5FATAjWaIHqKTtYlKNQi6pc=
github.com/yihuang/cosmos-sdk/store v0.0.0-20240401113147-37956eeb8606/go.mod h1:lfuLI1f4o+0SGtlHQS4x5qsjRcZZfYqG8bp3k8hM0M8=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
6 changes: 3 additions & 3 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
@@ -41,9 +41,9 @@ schema = 3
version = "v1.3.0"
hash = "sha256-EEFK43Cr0g0ndhQhkIKher0FqV3mvkmE9z0sP7uVSHg="
[mod."cosmossdk.io/store"]
version = "v0.0.0-20240401113147-37956eeb8606"
version = "v0.0.0-20240402015425-ec314e8e2d07"
hash = "sha256-0yj6ToF5tiOsJ7B3sBS9lLLEDVrKJxi1tNlqRcWauDw="
replaced = "github.com/yihuang/cosmos-sdk/store"
replaced = "github.com/crypto-org-chain/cosmos-sdk/store"
[mod."cosmossdk.io/tools/confix"]
version = "v0.1.1"
hash = "sha256-/Et2FFhb4XfakbLFvGQK3QxN5Y7alzO+DGfi2/EWbxo="
@@ -161,7 +161,7 @@ schema = 3
version = "v1.0.0-beta.4"
hash = "sha256-5Kn82nsZfiEtuwhhLZqmMxdAY1tX/Fi3HJ0/MEaRohw="
[mod."github.com/cosmos/cosmos-sdk"]
version = "v0.46.0-beta2.0.20240401080707-77efecc0520d"
version = "v0.46.0-beta2.0.20240402015425-ec314e8e2d07"
hash = "sha256-kp8xXSle0X8PW4uIHXmfkGHjj3y6KTpcbvW+oJHsLzI="
replaced = "github.com/crypto-org-chain/cosmos-sdk"
[mod."github.com/cosmos/go-bip39"]

Unchanged files with check annotations Beta

return valid and 9000 == int.from_bytes(base64.b64decode(ret.encode()), "big")
# in normal mode, grpc query works even if we don't pass chain_id explicitly
grpc_eth_call(api_port, msg, expect_cb)

Check failure on line 86 in tests/integration_tests/test_grpc_only.py

GitHub Actions / integration_tests (unmarked)

test_grpc_mode KeyError: 'ret'
# wait 1 more block for both nodes to avoid node stopped before tnx get included
for i in range(2):
wait_for_block(custom_ethermint.cosmos_cli(i), 1)
commitMS func()
)
if parentCacheMS, ok := ctx.MultiStore().(cachemulti.Store); ok {
cacheMS = parentCacheMS.Clone()
commitMS = func() { parentCacheMS.Restore(cacheMS) }

Check warning on line 109 in x/evm/statedb/statedb.go

Codecov / codecov/patch

x/evm/statedb/statedb.go#L108-L109

Added lines #L108 - L109 were not covered by tests
} else {
// in unit test, it could be run with a uncached multistore
if cacheMS, ok = ctx.MultiStore().CacheWrap().(cachemulti.Store); !ok {
panic("expect the CacheWrap result to be cachemulti.Store")

Check warning on line 113 in x/evm/statedb/statedb.go

Codecov / codecov/patch

x/evm/statedb/statedb.go#L113

Added line #L113 was not covered by tests
}
commitMS = cacheMS.Write
}