cosmos-sdk icon indicating copy to clipboard operation
cosmos-sdk copied to clipboard

Can't run simapp with supernova

Open simonzg opened this issue 5 months ago • 1 comments

Hi, cosmos team, we're developing a cometbft drop-in replacement called supernova, and we're trying to run the supernova consensus node with simapp. However, I saw errors like

ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp

and

collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cosmos.mint.v1beta1.Minter

multiple times in the log. Tried my best to dig deep and debug, but need someone shed some lights on this.

The steps to reproduce are a somewhat complicated, but I'll just post here for reference:

  1. use code from PR https://github.com/cosmos/cosmos-sdk/pull/24872
  2. update server/start.go with diff
diff --git a/server/start.go b/server/start.go
index 0f46708498..c6d0a60e32 100644
--- a/server/start.go
+++ b/server/start.go
@@ -21,16 +21,16 @@ import (
        cmtcfg "github.com/cometbft/cometbft/v2/config"
        cmtjson "github.com/cometbft/cometbft/v2/libs/json"
        "github.com/cometbft/cometbft/v2/node"
-       "github.com/cometbft/cometbft/v2/p2p"
        pvm "github.com/cometbft/cometbft/v2/privval"
        "github.com/cometbft/cometbft/v2/proxy"
        rpchttp "github.com/cometbft/cometbft/v2/rpc/client/http"
-       "github.com/cometbft/cometbft/v2/rpc/client/local"
        sm "github.com/cometbft/cometbft/v2/state"
        "github.com/cometbft/cometbft/v2/store"
        cmttypes "github.com/cometbft/cometbft/v2/types"
        dbm "github.com/cosmos/cosmos-db"
        "github.com/hashicorp/go-metrics"
+       snode "github.com/meterio/supernova/node"
+       sntypes "github.com/meterio/supernova/types"
        "github.com/spf13/cobra"
        "github.com/spf13/pflag"
        "golang.org/x/sync/errgroup"
@@ -325,7 +325,7 @@ func startInProcess(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clien
                svrCfg.GRPC.Enable = true
        } else {
                svrCtx.Logger.Info("starting node with ABCI CometBFT in-process")
-               tmNode, cleanupFn, err := startCmtNode(ctx, cmtCfg, app, svrCtx)
+               _, cleanupFn, err := startCmtNode(ctx, cmtCfg, app, svrCtx)
                if err != nil {
                        return err
                }
@@ -337,11 +337,11 @@ func startInProcess(svrCtx *Context, svrCfg serverconfig.Config, clientCtx clien
                if svrCfg.API.Enable || svrCfg.GRPC.Enable {
                        // Re-assign for making the client available below do not use := to avoid
                        // shadowing the clientCtx variable.
-                       clientCtx = clientCtx.WithClient(local.New(tmNode))
+                       // clientCtx = clientCtx.WithClient(local.New(tmNode))
 
-                       app.RegisterTxService(clientCtx)
-                       app.RegisterTendermintService(clientCtx)
-                       app.RegisterNodeService(clientCtx, svrCfg)
+                       // app.RegisterTxService(clientCtx)
+                       // app.RegisterTendermintService(clientCtx)
+                       // app.RegisterNodeService(clientCtx, svrCfg)
                }
        }
 
@@ -372,8 +372,8 @@ func startCmtNode(
        cfg *cmtcfg.Config,
        app types.Application,
        svrCtx *Context,
-) (tmNode *node.Node, cleanupFn func(), err error) {
-       nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile())
+) (tmNode *snode.Node, cleanupFn func(), err error) {
+       nodeKey, err := sntypes.LoadOrGenNodeKey(cfg.NodeKeyFile())
        if err != nil {
                return nil, cleanupFn, fmt.Errorf("failed to load or generate node key: %w", err)
        }
@@ -385,7 +385,7 @@ func startCmtNode(
        }
 
        cmtApp := NewCometABCIWrapper(app)
-       tmNode, err = node.NewNode(
+       tmNode, err = snode.NewNode(
                ctx,
                cfg,
                pv,
  1. do go mod tidy under cosmos-sdk and simapp to include supernova dependencies
  2. make build
  3. ./build/simd init nova1 --chain-id test-chain --consensus-key-algo bls12_381
  4. ./build/simd keys add alice
  5. ./build/simd genesis add-genesis-account alice 10000000000000000000000stake
  6. ./build/simd genesis gentx alice 3000000000000stake --chain-id test-chain --pubkey '{"@type":"/cosmos.crypto.bls12_381.PubKey","key":"<REPLACE_WITH_ACTUAL_KEY>"}' --consensus-key-algo bls12_381
  7. ./build/simd genesis collect-gentxs
  8. ./build/simd start

The full log will look like this

5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x1400171f320, acc}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001a87e40, mint}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x1400192d950, upgrade}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x140016decb0, evidence}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x1400183b420, feegrant}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001a86c40, staking}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001a87290, slashing}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x1400192c430, protocolpool}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001414930, nft}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x140022d4110, epochs}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x1400192cd40, gov}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x140016de7b0, authz}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x140016dfd40, group}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001415ea0, consensus}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001747900, circuit}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x1400171e2c0, bank}" version=1
5:04PM INF Upgrading IAVL storage for faster queries + execution on live state. This may take a while commit=436F6D6D697449447B5B5D3A307D module=server store_key="KVStoreKey{0x14001c87700, distribution}" version=1
5:04PM INF starting node with ABCI CometBFT in-process module=server
cmtlog level:  info
slog   level:  INFO
2025-06-17 17:04:52 INF Supernova start ... version=2.0.0-dev
5:04PM INF service start impl=EventBus module=events msg="Starting EventBus service"
5:04PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
Start handshake
Consensus Params:  {max_bytes:4194304 max_gas:10000000  max_age_num_blocks:100000 max_age_duration:<seconds:172800 > max_bytes:1048576  pub_key_types:"bls12_381"   <nil> precision:<nanos:505000000 > message_delay:<seconds:15 >  vote_extensions_enable_height:<> pbts_enable_height:<> }
Consensus Params:   4194304 4194304 48h0m0s
5:04PM INF InitChain chainID=test-chain initialHeight=1 module=baseapp
5:04PM INF initializing blockchain state from genesis.json module=baseapp
InitChain Response Validators:  1
2025-06-17 17:04:52 INF saving genesis validator set pkg=c hash=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 size=0
2025-06-17 17:04:52 INF saving genesis next validator set pkg=c hash=9f6724e03de06f74b5cf6dee1a84288d93f330fb8b1049e4404dbbe98cbd2b9b size=1
Best Block:  k#0..44e8a141[ QC(#0..00000000, E0.R0, voted:0/0) ]
Best QC:  QC(#0..44e8a141, E0.R0, BitArray:(0/0), AggSig:len(0))
2025-06-17 17:04:52 INF Chain initialized pkg=c best=k#0..44e8a141 bestQC="QC(#0..44e8a141, E0.R0, BitArray:(0/0), AggSig:len(0))"
  0 :  bls12_381 042e8fc3371ed21bbc6816394f7dc39ba64dad45b8bfcc906415f9819c93e644d5f97fbcaf4805ea22a24d79c4c021a60bf55f03cf908dd9d770d4a41dcac1e2179477364b806de9609d08f9686ac78444d7d9726397ebc00df8870f97f57e89
save init chain response
INFO[0000] Wrote network key to file                     path=/Users/simon/.simapp/network-keys prefix=p2p
INFO[0000] Running node with peer id of 16Uiu2HAkwPQTAJjJEaYpxahPKz3U61nK45uT8yqrdTJAQN34C6Z3   prefix=p2p
DEBU[0000] ECDSA private key generated                   prefix=p2p
Starting Supernova/v2.0.0-dev/darwin/go1.24.3
    Network         [ 0x00000000a25a0f8b9f38b6b5ef55f6224c054a38765cf41eaf5d345744e8a141 ]    
    Best block      [ 0x00000000a25a0f8b9f38b6b5ef55f6224c054a38765cf41eaf5d345744e8a141 #0 @2025-06-17 15:56:25.960047 -0700 PDT ]
    Forks           [ FTRL: #0 ]
    PubKey          [ 042e8fc3371ed21bbc6816394f7dc39ba64dad45b8bfcc906415f9819c93e644d5f97fbcaf4805ea22a24d79c4c021a60bf55f03cf908dd9d770d4a41dcac1e2179477364b806de9609d08f9686ac78444d7d9726397ebc00df8870f97f57e89 ]
    API portal      [ :8670 ]
2025-06-17 17:04:53 INF closing tx pool...
2025-06-17 17:04:53 INF Node Start pkg=node
n.pacemaker &{0x14001ba7220 2.0.0-dev 0x1400449f380 0x14004633200 0x14002028090 0x140016ee570 0x14003f47950 0x14004726140 <nil> <nil> [] <nil> 0 {0 0 <nil>} 0 <nil> <nil> <nil> -1 0x14001a323c0 {{} {0 0}} 0x14001f1a700 0x14001d94c60 <nil> nil 0 0x140006f91f0 <nil> 0x14004c4c000 <nil> 0 0x14001ca81e0}
p &{0x14001ba7220 2.0.0-dev 0x1400449f380 0x14004633200 0x14002028090 0x140016ee570 0x14003f47950 0x14004726140 <nil> <nil> [] <nil> 0 {0 0 <nil>} 0 <nil> <nil> <nil> -1 0x14001a323c0 {{} {0 0}} 0x14001f1a700 0x14001d94c60 <nil> nil 0 0x140006f91f0 <nil> 0x14004c4c000 <nil> 0 0x14001ca81e0}
c &{0x1400021fbf0 <nil> 0x14004c3a330 0x14001c4dae0 {0x14002ee5f10} {{{} {0 0}} 0 0 {{} 0} {{} 0}} {{{} {0 0}} <nil>} 0x140034037c0 {{{} {0 0}} 0 0 {{} 0} {{} 0}} 0x14002ee5f00}
2025-06-17 17:04:53 INF *** Pacemaker regulate with bestQC QC(#0..44e8a141, E0.R0, voted:0/0)  pkg=pm
2025-06-17 17:04:53 INF API started addr=:8670
2025-06-17 17:04:53 INF calc epoch state pkg=es kblk=0 vsetHash=9f6724e03de06f74b5cf6dee1a84288d93f330fb8b1049e4404dbbe98cbd2b9b committeeSize=1
2025-06-17 17:04:53 INF --------------------------------------------------------- pkg=pm
2025-06-17 17:04:53 INF Entered epoch 1 pkg=pm
2025-06-17 17:04:53 INF --------------------------------------------------------- pkg=pm
2025-06-17 17:04:53 INF I'm IN committee !!! pkg=pm myAddr=4eeca51d34f7dc0355824bad7d54637f20a2b92b index=0 committee=1
2025-06-17 17:04:53 INF E:1, Round:0 restart pkg=pm lastRound=0 type=Regular proposer=0x4eeca51d..20a2b92b:key:042e8fc3..97f57e89 interval=8s
2025-06-17 17:04:53 INF ==> OnBeat Epoch:1, Round:0 pkg=pm
2025-06-17 17:04:53 INF proposed b#1..971dc98c[ QC(#0..44e8a141, E0.R0, voted:0/0) ] pkg=pm elapsed=377.333µs
2025-06-17 17:04:53 INF schedule broadcast for b#1..971dc98c(E:1) after 1.399s pkg=pm
INFO[0000] Started discovery v5                          ENR="enr:-MK4QOttsLHtJyvIV7KJ36a_SMnn7dBc-6c_e7O1PdfX4RxsSYv4wqzJFY26GACQ3vVIam8ugITJV8Z76NsoO2pd0AOGAZeAWlSSh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC2BXiYAQAAAAAiAQAAAAAAgmlkgnY0gmlwhAoAAIaJc2VjcDI1NmsxoQIdIqeN1fix30bM2a7pcc54kusoYsoxfCgQVAxwZ1uK3ohzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A" id=a1ace618d62cf221f3818e3bd3a7833661d652dea6d5630868e1326a7456d2e8 prefix=p2p
DEBU[0000] Searching for new active peers                currentPeerCount=0 prefix=p2p targetPeerCount=40
INFO[0000] New node record                               ENR="enr:-MK4QO5MQC2MXGZMXHz8_ygQpLJJRueU1Dyl3xXArrhoStoiOMNqWISEVVsPIqOTA5BuaGswwYPtZCdJUvFxoDM6OaGGAZeAWlSTh2F0dG5ldHOIAAAAAGAAAACEZXRoMpC2BXiYAQAAAAAiAQAAAAAAgmlkgnY0gmlwhAoAAIaJc2VjcDI1NmsxoQIdIqeN1fix30bM2a7pcc54kusoYsoxfCgQVAxwZ1uK3ohzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A" prefix=p2p
INFO[0000] Node started p2p server                       multiAddr=/ip4/0.0.0.0/tcp/13000/p2p/16Uiu2HAkwPQTAJjJEaYpxahPKz3U61nK45uT8yqrdTJAQN34C6Z3 prefix=p2p
2025-06-17 17:04:54 INF INFO recv Proposal(E1.R0) b#1..971dc98c[ QC(#0..44e8a141, E0.R0, voted:0/0) ]  pkg=in from=0x4eeca51d34f7dc0355824bad7d54637f20a2b92b qlen=0
2025-06-17 17:04:54 WRN load validator set e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 failed pkg=c err="fromProto: validatorSet proposer error: nil validator"
2025-06-17 17:04:54 INF validated proposal Block R:0, b#1..971dc98c, txs:0 pkg=pm elapsed=370.667µs
2025-06-17 17:04:54 INF --------------------------------------------------------- pkg=pm
2025-06-17 17:04:54 INF E:1, Round:1 start pkg=pm lastRound=0 type=Regular proposer=0x4eeca51d..20a2b92b:key:042e8fc3..97f57e89 interval=8s
2025-06-17 17:04:54 INF INFO recv Vote(R:0) #1..971dc98c pkg=in from=0x4eeca51d34f7dc0355824bad7d54637f20a2b92b qlen=0
2025-06-17 17:04:54 INF 1/1 voted on #1..971dc98c, R:0, QC formed. pkg=qcman
2025-06-17 17:04:54 INF QCHigh update to DraftQC(E1.R0 -> #1..971dc98c) pkg=pm from="DraftQC(E0.R0 -> #0..44e8a141)"
2025-06-17 17:04:54 INF E:1, Round:1 restart pkg=pm lastRound=1 type=Regular proposer=0x4eeca51d..20a2b92b:key:042e8fc3..97f57e89 interval=8s
2025-06-17 17:04:54 INF ==> OnBeat Epoch:1, Round:1 pkg=pm
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
2025-06-17 17:04:54 INF proposed b#2..11aef621[ QC(#1..971dc98c, E1.R0, voted:1/1) ] pkg=pm elapsed=381.375µs
2025-06-17 17:04:54 INF schedule broadcast for b#2..11aef621(E:1) after 1.399s pkg=pm
2025-06-17 17:04:55 INF INFO recv Proposal(E1.R1) b#2..11aef621[ QC(#1..971dc98c, E1.R0, voted:1/1) ]  pkg=in from=0x4eeca51d34f7dc0355824bad7d54637f20a2b92b qlen=0
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
2025-06-17 17:04:55 INF validated proposal Block R:1, b#2..11aef621, txs:0 pkg=pm elapsed=966.792µs
2025-06-17 17:04:55 INF --------------------------------------------------------- pkg=pm
2025-06-17 17:04:55 INF E:1, Round:2 start pkg=pm lastRound=1 type=Regular proposer=0x4eeca51d..20a2b92b:key:042e8fc3..97f57e89 interval=8s
2025-06-17 17:04:55 INF INFO recv Vote(R:1) #2..11aef621 pkg=in from=0x4eeca51d34f7dc0355824bad7d54637f20a2b92b qlen=0
2025-06-17 17:04:55 INF 1/1 voted on #2..11aef621, R:1, QC formed. pkg=qcman
2025-06-17 17:04:55 INF QCHigh update to DraftQC(E1.R1 -> #2..11aef621) pkg=pm from="DraftQC(E1.R0 -> #1..971dc98c)"
2025-06-17 17:04:55 INF E:1, Round:2 restart pkg=pm lastRound=2 type=Regular proposer=0x4eeca51d..20a2b92b:key:042e8fc3..97f57e89 interval=8s
2025-06-17 17:04:55 INF ==> OnBeat Epoch:1, Round:2 pkg=pm
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
2025-06-17 17:04:55 INF proposed b#3..3e22fb06[ QC(#2..11aef621, E1.R1, voted:1/1) ] pkg=pm elapsed=1.214ms
2025-06-17 17:04:55 INF schedule broadcast for b#3..3e22fb06(E:1) after 1.398s pkg=pm
2025-06-17 17:04:57 INF INFO recv Proposal(E1.R2) b#3..3e22fb06[ QC(#2..11aef621, E1.R1, voted:1/1) ]  pkg=in from=0x4eeca51d34f7dc0355824bad7d54637f20a2b92b qlen=0
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
2025-06-17 17:04:57 INF validated proposal Block R:2, b#3..3e22fb06, txs:0 pkg=pm elapsed=576.75µs
2025-06-17 17:04:57 WRN load validator set e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 failed pkg=c err="fromProto: validatorSet proposer error: nil validator"
5:04PM ERR OE aborted due to hash mismatch module=oe oe_hash=000000038441b800bf930b26c7d63e7a3edbcb0fc6fbfa8dd0e979c63e22fb06 oe_height=3 req_hash=00000001bee1abcb13c6931657ffb98cada85d987977ce4d7d346097971dc98c req_height=3
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
5:04PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
Finalize block failed:  collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cosmos.mint.v1beta1.Minter
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x50 pc=0x102a05ad8]

goroutine 365 [running]:
github.com/meterio/supernova/consensus.(*Executor).applyBlock(0x140016ee570, 0x14001d865d0, 0x1)
        github.com/meterio/[email protected]/consensus/executor.go:145 +0x628
github.com/meterio/supernova/consensus.(*Executor).ApplyBlock(0x14002028090?, 0x105c5a778?, 0x10897f760?)
        github.com/meterio/[email protected]/consensus/executor.go:120 +0x1c
github.com/meterio/supernova/consensus.(*Pacemaker).CommitBlock(0x14000b00000, 0x14001d865d0, 0x1400205a410)
        github.com/meterio/[email protected]/consensus/pacemaker_commit.go:28 +0x260
github.com/meterio/supernova/consensus.(*Pacemaker).OnCommit(0x14000b00000, {0x14001e12210?, 0x10897f760?, 0xfffffffffffffffc?})
        github.com/meterio/[email protected]/consensus/pacemaker.go:244 +0x10c
github.com/meterio/supernova/consensus.(*Pacemaker).Update(0x14000b00000, 0x14002f064b0)
        github.com/meterio/[email protected]/consensus/pacemaker.go:214 +0x610
github.com/meterio/supernova/consensus.(*Pacemaker).OnReceiveProposal(0x14000b00000, {{0x105c79ac0, 0x140036eea20}, {0x4e, 0xec, 0xa5, 0x1d, 0x34, 0xf7, 0xdc, ...}, ...})
        github.com/meterio/[email protected]/consensus/pacemaker.go:377 +0xa5c
github.com/meterio/supernova/consensus.(*Pacemaker).mainLoop(0x14000b00000)
        github.com/meterio/[email protected]/consensus/pacemaker.go:699 +0x70c
created by github.com/meterio/supernova/consensus.(*Pacemaker).Start in goroutine 363
        github.com/meterio/[email protected]/consensus/pacemaker.go:599 +0xa0

simonzg avatar Jun 18 '25 00:06 simonzg

5:04PM ERR OE aborted due to hash mismatch module=oe oe_hash=000000038441b800bf930b26c7d63e7a3edbcb0fc6fbfa8dd0e979c63e22fb06 oe_height=3 req_hash=00000001bee1abcb13c6931657ffb98cada85d987977ce4d7d346097971dc98c req_height=3

One of these lines is failing. It looks like optimistic execution is enabled in your app (default is on in the simapp). This might be making some assumptions about comet that are not true about supernova - I would first try by running with OE disabled

aljo242 avatar Jun 18 '25 19:06 aljo242

Tried with OE disabled, it removes OE related errors from the log, but no other effects.

2025-06-18 16:34:35 INF validated proposal Block R:2, b#3..2857d49c, txs:0 pkg=pm elapsed=1.490ms
2025-06-18 16:34:35 WRN load validator set e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 failed pkg=c err="fromProto: validatorSet proposer error: nil validator"
4:34PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
4:34PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cometbft.types.v2.ConsensusParams" module=baseapp
Finalize block failed:  collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/cosmos.mint.v1beta1.Minter
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x50 pc=0x104c59908]

goroutine 355 [running]:
github.com/meterio/supernova/consensus.(*Executor).applyBlock(0x14004cdb590, 0x14004d8b9b0, 0x1)
        github.com/meterio/[email protected]/consensus/executor.go:145 +0x628
github.com/meterio/supernova/consensus.(*Executor).ApplyBlock(0x14004cdc7c0?, 0x107eae5f8?, 0x10abd3760?)
        github.com/meterio/[email protected]/consensus/executor.go:120 +0x1c
github.com/meterio/supernova/consensus.(*Pacemaker).CommitBlock(0x140047c4b40, 0x14004d8b9b0, 0x14003667590)
        github.com/meterio/[email protected]/consensus/pacemaker_commit.go:28 +0x260
github.com/meterio/supernova/consensus.(*Pacemaker).OnCommit(0x140047c4b40, {0x140036559e0?, 0x10abd3760?, 0xfffffffffffffffc?})
        github.com/meterio/[email protected]/consensus/pacemaker.go:244 +0x10c
github.com/meterio/supernova/consensus.(*Pacemaker).Update(0x140047c4b40, 0x140053922d0)
        github.com/meterio/[email protected]/consensus/pacemaker.go:214 +0x610
github.com/meterio/supernova/consensus.(*Pacemaker).OnReceiveProposal(0x140047c4b40, {{0x107ecd940, 0x140025dfd40}, {0x4e, 0xec, 0xa5, 0x1d, 0x34, 0xf7, 0xdc, ...}, ...})
        github.com/meterio/[email protected]/consensus/pacemaker.go:377 +0xa5c
github.com/meterio/supernova/consensus.(*Pacemaker).mainLoop(0x140047c4b40)
        github.com/meterio/[email protected]/consensus/pacemaker.go:699 +0x70c
created by github.com/meterio/supernova/consensus.(*Pacemaker).Start in goroutine 337
        github.com/meterio/[email protected]/consensus/pacemaker.go:599 +0xa0```

simonzg avatar Jun 18 '25 23:06 simonzg

I was able to fix this by adding this in supernova after InitChain to flush the genesis cache

                 ...

		res, err := proxyApp.Consensus().InitChain(context.TODO(), req)
		if err != nil {
			h.logger.Error("InitChain failed", "err", err)
			return nil, err
		}

		nextValsHash := geneVSet.Hash()
		flushReq := &abci.FinalizeBlockRequest{
			Height:             req.InitialHeight,
			Time:               req.Time,
			ProposerAddress:    nil,
			DecidedLastCommit:  abci.CommitInfo{},
			Txs:                nil,
			Hash:               nil,
			NextValidatorsHash: nextValsHash,
			SyncingToHeight:    req.InitialHeight,
		}
		if _, err := proxyApp.Consensus().FinalizeBlock(context.TODO(), flushReq); err != nil {
			return nil, fmt.Errorf("finalize genesis block: %w", err)
		}

                 ...

kyriediculous avatar Oct 29 '25 15:10 kyriediculous