gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source.
https://gno.land/
Other
880 stars 364 forks source link

`internal error` when adding package: `{WritePerByte}` error #803

Closed schollz closed 1 year ago

schollz commented 1 year ago

I'm running into an error and everything I've tried to understand it / workaround it has failed. For some reason, one of my packages keeps giving an error.

I have a couple of "audio" packages and all of them are passing tests and compiling with the gnovm:

test commands
gno test --verbose examples/gno.land/p/demo/audio/ 2>&1
?       ./examples/gno.land/p/demo/audio/biquad     [no test files]
=== RUN   TestByteBeat
--- PASS: TestByteBeat (2.88s)
ok      ./examples/gno.land/p/demo/audio/bytebeat   4.04s
=== RUN   TestRiff
--- PASS: TestRiff (0.00s)
ok      ./examples/gno.land/p/demo/audio/riff   1.03s
=== RUN   TestWav
--- PASS: TestWav (0.00s)
ok      ./examples/gno.land/p/demo/audio/wav    1.10s
go run ./gnovm/cmd/gno precompile --verbose ./examples/gno.land/p/demo/audio
examples/gno.land/p/demo/audio/biquad/biquad.gno
examples/gno.land/p/demo/audio/bytebeat/bytebeat.gno
examples/gno.land/p/demo/audio/biquad/biquad.gno
examples/gno.land/p/demo/audio/wav/wav.gno
examples/gno.land/p/demo/audio/riff/riff.gno
examples/gno.land/p/demo/audio/riff/riff_test.gno
examples/gno.land/p/demo/audio/wav/wav_test.gno
examples/gno.land/p/demo/ufmt/ufmt.gno
examples/gno.land/p/demo/ufmt/ufmt_test.gno
examples/gno.land/p/demo/audio/bytebeat/bytebeat_test.gno
examples/gno.land/p/demo/audio/riff/riff.gno
examples/gno.land/p/demo/audio/riff/riff_test.gno
examples/gno.land/p/demo/audio/wav/wav.gno
examples/gno.land/p/demo/audio/wav/wav_test.gno
go run ./gnovm/cmd/gno build --verbose ./examples/gno.land/p/demo/audio
./examples/gno.land/p/demo/audio/biquad
./examples/gno.land/p/demo/audio/bytebeat
./examples/gno.land/p/demo/audio/riff
./examples/gno.land/p/demo/audio/wav
go run ./gnovm/cmd/gno precompile --verbose ./examples/gno.land/r/demo/bytebeat
examples/gno.land/r/demo/bytebeat/bytebeat.gno
examples/gno.land/p/demo/audio/bytebeat/bytebeat.gno
examples/gno.land/p/demo/audio/biquad/biquad.gno
examples/gno.land/p/demo/audio/wav/wav.gno
examples/gno.land/p/demo/audio/riff/riff.gno
examples/gno.land/p/demo/audio/riff/riff_test.gno
examples/gno.land/p/demo/audio/wav/wav_test.gno
examples/gno.land/p/demo/ufmt/ufmt.gno
examples/gno.land/p/demo/ufmt/ufmt_test.gno
examples/gno.land/p/demo/audio/bytebeat/bytebeat_test.gno
examples/gno.land/r/demo/bytebeat/bytebeat_test.gno
go run ./gnovm/cmd/gno build --verbose ./examples/gno.land/r/demo/bytebeat
./examples/gno.land/r/demo/bytebeat

I am hitting the problem when posting the package to gnoland. All my packages succeed when posting, except for the bytebeat one, but the error at this stage is just internal error:

gnokey maketx output
cat password | gnokey maketx addpkg --pkgpath "gno.land/p/demo/audio/biquad" --pkgdir "examples/gno.land/p/demo/audio/biquad" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 2000000 --broadcast --chainid dev --remote localhost:26657 --insecure-password-stdin=true zkey
Enter password.
OK!
GAS WANTED: 2000000
GAS USED:   1579484

cat password | gnokey maketx addpkg --pkgpath "gno.land/p/demo/audio/riff" --pkgdir "examples/gno.land/p/demo/audio/riff" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 2000000 --broadcast --chainid dev --remote localhost:26657 --insecure-password-stdin=true zkey
Enter password.
OK!
GAS WANTED: 2000000
GAS USED:   451457

cat password | gnokey maketx addpkg --pkgpath "gno.land/p/demo/audio/wav" --pkgdir "examples/gno.land/p/demo/audio/wav" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 2000000 --broadcast --chainid dev --remote localhost:26657 --insecure-password-stdin=true zkey
Enter password.
OK!
GAS WANTED: 2000000
GAS USED:   592601

cat password | gnokey maketx addpkg --pkgpath "gno.land/p/demo/audio/bytebeat" --pkgdir "examples/gno.land/p/demo/audio/bytebeat" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 2000000 --broadcast --chainid dev --remote localhost:26657 --insecure-password-stdin=true  zkey
Enter password.
internal error

gnoland gives some more output, but the only thing I can glean is that it says WritePerByte is causing some kind of panic.

gnoland output

.level 0 .msg Invalid tx [error internal error log recovered: gno.land/p/demo/audio/bytebeat/bytebeat.gno:1: {WritePerByte}
stack:
goroutine 37 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runTx.func1()
        /home/zns/Documents/gno/tm2/pkg/sdk/baseapp.go:743 +0x2cd
panic({0xca1b20, 0xc00af610c0})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow.func1()
        /home/zns/Documents/gno/gnovm/pkg/gnolang/preprocess.go:2859 +0x2d2
panic({0xc77740, 0xc00af566d0})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/gnolang/gno/tm2/pkg/store/types.(*basicGasMeter).ConsumeGas(0x454d7e?, 0x11?, {0xd37e01?, 0x600c33?})
        /home/zns/Documents/gno/tm2/pkg/store/types/gas.go:97 +0x78
github.com/gnolang/gno/tm2/pkg/store/gas.(*Store).Set(0xc00914a900, {0xc00af84918, 0x11, 0x18}, {0xc00b09c880, 0xd07, 0xd80})
        /home/zns/Documents/gno/tm2/pkg/store/gas/store.go:43 +0x99
github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).SetType(0xc0001d02d0, {0xf974d0, 0xc009b08b40})
        /home/zns/Documents/gno/gnovm/pkg/gnolang/store.go:436 +0x186
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).savePackageValuesAndTypes(0xc0000d7320)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/machine.go:550 +0x1f9
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunMemPackage(0xc0000d7320, 0xc009267680, 0x1)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/machine.go:238 +0x231
github.com/gnolang/gno/tm2/pkg/sdk/vm.(*VMKeeper).initBuiltinPackagesAndTypes.func1({0xc009238d51, 0x5})
        /home/zns/Documents/gno/tm2/pkg/sdk/vm/builtins.go:35 +0x20c
github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).GetPackage(0xc0001d02d0, {0xc009238d51, 0x5}, 0xd8?)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/store.go:162 +0x1e2
github.com/gnolang/gno/gnovm/pkg/gnolang.tryPredefine({0xfa63f8, 0xc0001d02d0}, {0xfa3e58, 0xc001bcd8c0}, {0xf9e670, 0xc005b74a80?})
        /home/zns/Documents/gno/gnovm/pkg/gnolang/preprocess.go:2972 +0x15f
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow2({0xfa63f8, 0xc0001d02d0}, {0xfa3e58?, 0xc001bcd8c0}, {0xf9e670, 0xc005b74a80?}, 0x4508b2?)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/preprocess.go:2875 +0x125
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow({0xfa63f8, 0xc0001d02d0}, {0xfa3e58, 0xc001bcd8c0}, {0xf9e670, 0xc005b74a80})
        /home/zns/Documents/gno/gnovm/pkg/gnolang/preprocess.go:2864 +0x149
github.com/gnolang/gno/gnovm/pkg/gnolang.PredefineFileSet({0xfa63f8, 0xc0001d02d0}, 0xc001e7eb00, 0xc009252588)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/preprocess.go:38 +0x6c5
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).runFiles(0xc00b047440, {0xc008e55b48, 0x1, 0x1})
        /home/zns/Documents/gno/gnovm/pkg/gnolang/machine.go:411 +0x291
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunFiles(...)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/machine.go:377
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunMemPackage(0xc00b047440, 0xc0091689c0, 0x1)
        /home/zns/Documents/gno/gnovm/pkg/gnolang/machine.go:234 +0x216
github.com/gnolang/gno/tm2/pkg/sdk/vm.(*VMKeeper).AddPackage(_, {{0xf95a68, 0xc00a795290}, 0x2, {0xf95660, 0xc00ab1e4b0}, {0xf95bf0, 0xc006b9bb80}, {0xc006b7544d, 0x3}, ...}, ...)
        /home/zns/Documents/gno/tm2/pkg/sdk/vm/keeper.go:180 +0x88a
github.com/gnolang/gno/tm2/pkg/sdk/vm.vmHandler.handleMsgAddPackage({_}, {{0xf95a68, 0xc00a795290}, 0x2, {0xf95660, 0xc00ab1e4b0}, {0xf95bf0, 0xc006b9bb80}, {0xc006b7544d, 0x3}, ...}, ...)
        /home/zns/Documents/gno/tm2/pkg/sdk/vm/handler.go:46 +0x2a5
github.com/gnolang/gno/tm2/pkg/sdk/vm.vmHandler.Process({_}, {{0xf95a68, 0xc00a795290}, 0x2, {0xf95660, 0xc00ab1e4b0}, {0xf95bf0, 0xc006b9bb80}, {0xc006b7544d, 0x3}, ...}, ...)
        /home/zns/Documents/gno/tm2/pkg/sdk/vm/handler.go:27 +0x205
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runMsgs(_, {{0xf95a68, 0xc00a795290}, 0x2, {0xf95660, 0xc00ab1e4b0}, {0xf95bf0, 0xc006b9bb80}, {0xc006b7544d, 0x3}, ...}, ...)
        /home/zns/Documents/gno/tm2/pkg/sdk/baseapp.go:644 +0x2ed
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runTx(0xc0001aa100, 0x2, {0xc009186a80, 0x9cb, _}, {{0xc00a5b58b0, 0x1, 0x1}, {0x1e8480, {{0xc00920b537, ...}, ...}}, ...})
        /home/zns/Documents/gno/tm2/pkg/sdk/baseapp.go:823 +0x965
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).DeliverTx(0x0?, {{}, {0xc009186a80?, 0x0?, 0x0?}})
        /home/zns/Documents/gno/tm2/pkg/sdk/baseapp.go:580 +0x17d
github.com/gnolang/gno/tm2/pkg/bft/abci/client.(*localClient).DeliverTxAsync(0xc0004132c0, {{}, {0xc009186a80, 0x9cb, 0x9cb}})
        /home/zns/Documents/gno/tm2/pkg/bft/abci/client/local_client.go:82 +0xfc
github.com/gnolang/gno/tm2/pkg/bft/proxy.(*appConnConsensus).DeliverTxAsync(0x0?, {{}, {0xc009186a80?, 0x0?, 0x0?}})
        /home/zns/Documents/gno/tm2/pkg/bft/proxy/app_conn.go:73 +0x26
github.com/gnolang/gno/tm2/pkg/bft/state.execBlockOnProxyApp({0xf968c8, 0xc004642de0}, {0xf98f90, 0xc0019b7ed0}, 0xc008b50340, {0xf9e850, 0xc000116018})
        /home/zns/Documents/gno/tm2/pkg/bft/state/execution.go:253 +0x5aa
github.com/gnolang/gno/tm2/pkg/bft/state.(*BlockExecutor).ApplyBlock(_, {{0xd3785c, 0xb}, {0xd3785c, 0xb}, {0x0, 0x0}, {0xc005bfb93d, 0x3}, 0x5, ...}, ...)
        /home/zns/Documents/gno/tm2/pkg/bft/state/execution.go:102 +0x115
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).finalizeCommit(0xc006a4e300, 0x6)
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:1347 +0x97e
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).tryFinalizeCommit(0xc006a4e300, 0x6)
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:1275 +0x313
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).enterCommit.func1()
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:1221 +0x97
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).enterCommit(0xc006a4e300, 0x6, 0x0)
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:1252 +0xb03
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).addVote(0xc006a4e300, 0xc00499cd20, {0x0, 0x0})
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:1637 +0x913
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).tryAddVote(0xc006a4e300, 0xf?, {0x0?, 0x0?})
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:1483 +0x27
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).handleMsg(0xc006a4e300, {{0xf8f220, 0xc008441940}, {0x0, 0x0}})
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:691 +0x318
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).receiveRoutine(0xc006a4e300, 0x0)
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:650 +0x42c
created by github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).OnStart
        /home/zns/Documents/gno/tm2/pkg/bft/consensus/state.go:344 +0x4af
 [module state]]
.level 1 .msg Executed block [height 6 validTxs 0 invalidTxs 1 [module state]]
.level 0 .msg Commit synced commit 436F6D6D697449447B5B332032313320323531203235302031343120323532203330203130322032353020313533203432203234312036203139372031353320313231203130332031343920313933203134352031363620313437203133312031353220323332203136203332203139362031313020313220313431203130305D3A367D
.level 1 .msg Committed state [height 6 txs 1 appHash 03D5FBFA8DFC1E66FA992AF106C599796795C191A6938398E81020C46E0C8D64 [module state]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A172F746D2E4E6577526F756E64537465704D6573736167651204080E1801 [module p2p]]
.level 0 .msg Attempt to update stats for non-existent peer [peer  [module consensus]]
.level 1 .msg HTTPJSONRPC [method broadcast_tx_commit args [<*rpctypes.Context Value> ] returns [<*core_types.ResultBroadcastTxCommit Value> ] [module rpc-server]]
.level 0 .msg Received tick [old_ti {3s 6 0 RoundStepPropose} new_ti {904.10075ms 7 0 RoundStepNewHeight} [module consensus]]
.level 0 .msg Scheduled timeout [dur 904.10075ms height 7 round 0 step RoundStepNewHeight [module consensus]]
.level 1 .msg Served RPC HTTP response [method POST url / status 200 duration 682 remoteAddr 127.0.0.1:35234 [module rpc-server]]
.level 1 .msg Timed out [dur 904.10075ms height 7 round 0 step RoundStepNewHeight [module consensus]]
.level 0 .msg Received tock [timeout 904.10075ms height 7 round 0 step RoundStepNewHeight [module consensus]]
.level 1 .msg enterNewRound(7/0). Current: 7/0/RoundStepNewHeight [[[height 7 round 0]] [module consensus]]
.level 1 .msg enterPropose(7/0). Current: 7/0/RoundStepNewRound [[[height 7 round 0]] [module consensus]]
.level 0 .msg This node is a validator [[[height 7 round 0]] [module consensus]]
.level 1 .msg enterPropose: Our turn to propose [[proposer g1k5p3hqd2cdr9jemhw2ez9tapu8wzk2rqzfrmh8 privValidator PrivValidator{g1k5p3hqd2cdr9jemhw2ez9tapu8wzk2rqzfrmh8 LH:6, LR:0, LS:3} [height 7 round 0]] [module consensus]]
.level 0 .msg Received tick [old_ti {904.10075ms 7 0 RoundStepNewHeight} new_ti {3s 7 0 RoundStepPropose} [module consensus]]
.level 0 .msg Timer already stopped [[module consensus]]
.level 0 .msg Scheduled timeout [dur 3s height 7 round 0 step RoundStepPropose [module consensus]]
.level 1 .msg Signed proposal [height 7 round 0 proposal Proposal{7/0 (6B3DE8C9004AF6F013CE53BE3D6468382DDCADDA9EB5D6E610A5E1D6D2FC383B:1:44E39DBA7458, -1) 959930EF98F1 @ 2023-05-06T20:13:16.640438908Z} [module consensus]]
.level 0 .msg Signed proposal block: Block{
  Header{
    Version:        v1.0.0-rc.0
    ChainID:        dev
    Height:         7
    Time:           2023-05-06 20:13:15.613101315 +0000 UTC
    NumTxs:         0
    TotalTxs:       4
    AppVersion:     
    LastBlockID:    BE33C8ABD3147765BEC4A3699E00E07062313D56F78FB1061F7D3B89040F9C0F:1:203C5C7208B2
    LastCommit:     [197 132 188 130 127 4 182 24 199 112 194 122 118 146 73 205 103 19 15 141 141 189 230 54 11 11 232 238 192 91 118 33]
    Data:           []
    Validators:     [160 121 206 56 221 72 96 61 201 104 209 159 28 169 82 68 20 104 59 148 127 111 20 179 102 214 76 214 213 15 32 16]
    NextValidators: [160 121 206 56 221 72 96 61 201 104 209 159 28 169 82 68 20 104 59 148 127 111 20 179 102 214 76 214 213 15 32 16]
    App:            [3 213 251 250 141 252 30 102 250 153 42 241 6 197 153 121 103 149 193 145 166 147 131 152 232 16 32 196 110 12 141 100]
    Consensus:      [184 168 103 92 89 134 82 76 96 65 34 95 215 186 32 109 130 205 92 58 55 80 67 240 66 252 221 118 142 21 146 236]
    Results:        [156 138 70 55 46 169 9 128 101 33 230 220 35 6 112 122 234 150 251 208 8 124 227 163 23 102 86 2 42 97 10 19]
    Proposer:       g1k5p3hqd2cdr9jemhw2ez9tapu8wzk2rqzfrmh8
  }#[107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59]
  Data{

  }#[]
  Commit{
    BlockID:    BE33C8ABD3147765BEC4A3699E00E07062313D56F78FB1061F7D3B89040F9C0F:1:203C5C7208B2
    Precommits:
      Vote{0:B5031B81AAC3 6/00/2(Precommit) BE33C8ABD314 D160C366F5AC @ 2023-05-06T20:13:15.613101315Z}
  }#[197 132 188 130 127 4 182 24 199 112 194 122 118 146 73 205 103 19 15 141 141 189 230 54 11 11 232 238 192 91 118 33]
}#[107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59] [[module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A172F746D2E4E6577526F756E64537465704D6573736167651204080E1803 [module p2p]]
.level 1 .msg Received proposal [proposal Proposal{7/0 (6B3DE8C9004AF6F013CE53BE3D6468382DDCADDA9EB5D6E610A5E1D6D2FC383B:1:44E39DBA7458, -1) 959930EF98F1 @ 2023-05-06T20:13:16.640438908Z} [module consensus]]
.level 1 .msg Received complete proposal block [height 7 hash [107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59] [module consensus]]
.level 1 .msg enterPrevote(7/0). Current: 7/0/RoundStepPropose [[module consensus]]
.level 1 .msg enterPrevote: ProposalBlock is valid [[[height 7 round 0]] [module consensus]]
.level 1 .msg Signed and pushed vote [height 7 round 0 vote Vote{0:B5031B81AAC3 7/00/1(Prevote) 6B3DE8C9004A F4B53107F401 @ 2023-05-06T20:13:16.668893909Z} err  [module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A172F746D2E4E6577526F756E64537465704D6573736167651204080E1804 [module p2p]]
.level 0 .msg Attempt to update stats for non-existent peer [peer  [module consensus]]
.level 0 .msg addVote [voteHeight 7 voteType 1 valIndex 0 csHeight 7 [module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A122F746D2E486173566F74654D6573736167651204080E1801 [module p2p]]
.level 1 .msg Added to prevote [vote Vote{0:B5031B81AAC3 7/00/1(Prevote) 6B3DE8C9004A F4B53107F401 @ 2023-05-06T20:13:16.668893909Z} prevotes VoteSet{H:7 R:0 T:1 +2/3:6B3DE8C9004AF6F013CE53BE3D6468382DDCADDA9EB5D6E610A5E1D6D2FC383B:1:44E39DBA7458(1) BA{1:x} map[]} [module consensus]]
.level 1 .msg Updating ValidBlock because of POL. [validRound -1 POLRound 0 [module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A182F746D2E4E657756616C6964426C6F636B4D657373616765122F080E1A240802122044E39DBA7458610EB1FCA36A0313D196091AF4C806360E7F48B9F49549666B4822050802120101 [module p2p]]
.level 1 .msg enterPrecommit(7/0). Current: 7/0/RoundStepPrevote [[[height 7 round 0]] [module consensus]]
.level 1 .msg enterPrecommit: +2/3 prevoted proposal block. Locking [[hash [107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59] [height 7 round 0]] [module consensus]]
.level 1 .msg Signed and pushed vote [height 7 round 0 vote Vote{0:B5031B81AAC3 7/00/2(Precommit) 6B3DE8C9004A 999191E39293 @ 2023-05-06T20:13:16.687961001Z} err  [module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A172F746D2E4E6577526F756E64537465704D6573736167651204080E1806 [module p2p]]
.level 0 .msg Attempt to update stats for non-existent peer [peer  [module consensus]]
.level 0 .msg addVote [voteHeight 7 voteType 2 valIndex 0 csHeight 7 [module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A122F746D2E486173566F74654D6573736167651204080E1802 [module p2p]]
.level 1 .msg Added to precommit [vote Vote{0:B5031B81AAC3 7/00/2(Precommit) 6B3DE8C9004A 999191E39293 @ 2023-05-06T20:13:16.687961001Z} precommits VoteSet{H:7 R:0 T:2 +2/3:6B3DE8C9004AF6F013CE53BE3D6468382DDCADDA9EB5D6E610A5E1D6D2FC383B:1:44E39DBA7458(1) BA{1:x} map[]} [module consensus]]
.level 0 .msg enterNewRound(7/0): Invalid args. Current step: 7/0/RoundStepPrecommit [[[height 7 round 0]] [module consensus]]
.level 0 .msg enterPrecommit(7/0): Invalid args. Current step: 7/0/RoundStepPrecommit [[[height 7 round 0]] [module consensus]]
.level 1 .msg enterCommit(7/0). Current: 7/0/RoundStepPrecommit [[[height 7 commitRound 0]] [module consensus]]
.level 1 .msg Commit is for locked block. Set ProposalBlock=LockedBlock [[blockHash [107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59] [height 7 commitRound 0]] [module consensus]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A172F746D2E4E6577526F756E64537465704D6573736167651204080E1808 [module p2p]]
.level 1 .msg Finalizing commit of block with 0 txs [height 7 hash [107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59] root [3 213 251 250 141 252 30 102 250 153 42 241 6 197 153 121 103 149 193 145 166 147 131 152 232 16 32 196 110 12 141 100] [module consensus]]
.level 1 .msg Block{
  Header{
    Version:        v1.0.0-rc.0
    ChainID:        dev
    Height:         7
    Time:           2023-05-06 20:13:15.613101315 +0000 UTC
    NumTxs:         0
    TotalTxs:       4
    AppVersion:     
    LastBlockID:    BE33C8ABD3147765BEC4A3699E00E07062313D56F78FB1061F7D3B89040F9C0F:1:203C5C7208B2
    LastCommit:     [197 132 188 130 127 4 182 24 199 112 194 122 118 146 73 205 103 19 15 141 141 189 230 54 11 11 232 238 192 91 118 33]
    Data:           []
    Validators:     [160 121 206 56 221 72 96 61 201 104 209 159 28 169 82 68 20 104 59 148 127 111 20 179 102 214 76 214 213 15 32 16]
    NextValidators: [160 121 206 56 221 72 96 61 201 104 209 159 28 169 82 68 20 104 59 148 127 111 20 179 102 214 76 214 213 15 32 16]
    App:            [3 213 251 250 141 252 30 102 250 153 42 241 6 197 153 121 103 149 193 145 166 147 131 152 232 16 32 196 110 12 141 100]
    Consensus:      [184 168 103 92 89 134 82 76 96 65 34 95 215 186 32 109 130 205 92 58 55 80 67 240 66 252 221 118 142 21 146 236]
    Results:        [156 138 70 55 46 169 9 128 101 33 230 220 35 6 112 122 234 150 251 208 8 124 227 163 23 102 86 2 42 97 10 19]
    Proposer:       g1k5p3hqd2cdr9jemhw2ez9tapu8wzk2rqzfrmh8
  }#[107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59]
  Data{

  }#[]
  Commit{
    BlockID:    BE33C8ABD3147765BEC4A3699E00E07062313D56F78FB1061F7D3B89040F9C0F:1:203C5C7208B2
    Precommits:
      Vote{0:B5031B81AAC3 6/00/2(Precommit) BE33C8ABD314 D160C366F5AC @ 2023-05-06T20:13:15.613101315Z}
  }#[197 132 188 130 127 4 182 24 199 112 194 122 118 146 73 205 103 19 15 141 141 189 230 54 11 11 232 238 192 91 118 33]
}#[107 61 232 201 0 74 246 240 19 206 83 190 61 100 104 56 45 220 173 218 158 181 214 230 16 165 225 214 210 252 56 59] [[module consensus]]
.level 1 .msg Executed block [height 7 validTxs 0 invalidTxs 0 [module state]]
.level 0 .msg Commit synced commit 436F6D6D697449447B5B332032313320323531203235302031343120323532203330203130322032353020313533203432203234312036203139372031353320313231203130332031343920313933203134352031363620313437203133312031353220323332203136203332203139362031313020313220313431203130305D3A377D
.level 1 .msg Committed state [height 7 txs 0 appHash 03D5FBFA8DFC1E66FA992AF106C599796795C191A6938398E81020C46E0C8D64 [module state]]
.level 0 .msg Broadcast [channel 32 msgBytes 0A172F746D2E4E6577526F756E64537465704D657373616765120408101801 [module p2p]]
.level 0 .msg Attempt to update stats for non-existent peer [peer  [module consensus]]
.level 0 .msg Received tick [old_ti {3s 7 0 RoundStepPropose} new_ti {959.155559ms 8 0 RoundStepNewHeight} [module consensus]]
.level 0 .msg Scheduled timeout [dur 959.155559ms height 8 round 0 step RoundStepNewHeight [module consensus]]
.level 1 .msg Timed out [dur 959.155559ms height 8 round 0 step RoundStepNewHeight [module consensus]]
.level 0 .msg Received tock [timeout 959.155559ms height 8 round 0 step RoundStepNewHeight [module consensus]]
.level 1 .msg enterNewRound(8/0). Current: 8/0/RoundStepNewHeight [[[height 8 round 0]] [module consensus]]
.level 0 .msg Received tick [old_ti {959.155559ms 8 0 RoundStepNewHeight} new_ti {1m0s 8 0 RoundStepNewRound} [module consensus]]
.level 0 .msg Timer already stopped [[module consensus]]
.level 0 .msg Scheduled timeout [dur 1m0s height 8 round 0 step RoundStepNewRound [module consensus]]

I'm hitting a bit of a wall here, if anyone has any ideas please let me know. The code I'm working on is here: https://github.com/schollz/gno/tree/bytebeat/examples/gno.land/p/demo/audio. I can make some detailed repro instructions if that is helpful.

moul commented 1 year ago

It's probably an (unclear) gas issue, i.e., because your contract is more significant than usual.

Can you try increasing the -gas-wanted value?

schollz commented 1 year ago

Thanks for the quick reply @moul! No rush on these questions, don't mean to pull you away from the weekend.

But, yeah, I tried to increase 5x and still same error:

cat password | gnokey maketx addpkg --pkgpath "gno.land/p/demo/audio/bytebeat" --pkgdir "examples/gno.land/p/demo/audio/bytebeat" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 10000000 --broadcast --chainid dev --remote localhost:26657 --insecure-password-stdin=true  zkey
Enter password.
internal error

If I go higher in gas-wanted it gives invalid gas wanted.

moul commented 1 year ago

I'll investigate further into the issue with your fourth command.

Meanwhile, I recommend cherry-picking this PR https://github.com/gnolang/gno/pull/806, which simplifies your workflow by enabling you to read errors directly from gnokey instead of the gnoland logs.

schollz commented 1 year ago

Ah brilliant, will cherry pick that, thanks.

schollz commented 1 year ago

@moul - I've simplified the file needed to get this error (here's my branch: https://github.com/gnolang/gno/compare/master...schollz:gno:writebyte).

All that is needed to get the WritePerByte error is having bufio.NewWriter:

func WriteByte() (data string) {
    var b bytes.Buffer
    w := bufio.NewWriter(&b)
    _ = w
    return
}

If I remove the bufio.NewWriter (along with bufio package), then no error occurs.

Here are the errors with the cherry-picked PR to print more errors:

errors
$ gnokey maketx addpkg --pkgpath "gno.land/p/demo/writebyte" --pkgdir "examples/gno.land/p/demo/writebyte" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 2000000 --broadcast --chainid dev --remote localhost:26657 zzkey1 
Enter password.
--= Error =--
Data: internal error
Msg Traces:
    0  /home/zns/Documents/gno-main/tm2/pkg/crypto/keys/client/addpkg.go:211 - deliver transaction failed: log:recovered: gno.land/p/demo/writebyte/writebyte.gno:1: {WritePerByte}
stack:
goroutine 40 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runTx.func1()
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:743 +0x2cd
panic({0xca1b20, 0xc006f63580})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow.func1()
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2854 +0x2d2
panic({0xc77740, 0xc00a0e0af0})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/gnolang/gno/tm2/pkg/store/types.(*basicGasMeter).ConsumeGas(0x454d7e?, 0x9?, {0xd37e01?, 0x0?})
        /home/zns/Documents/gno-main/tm2/pkg/store/types/gas.go:97 +0x78
github.com/gnolang/gno/tm2/pkg/store/gas.(*Store).Set(0xc00605d7a0, {0xc001888a00, 0x9, 0x10}, {0xc00525e000, 0xcfc1, 0xe000})
        /home/zns/Documents/gno-main/tm2/pkg/store/gas/store.go:43 +0x99
github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).AddMemPackage(0xc00025e360, 0xc00aa3ea40)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/store.go:531 +0x1a2
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunMemPackage(0xc005484b40, 0xc00aa3ea40, 0x1)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:240 +0x255
github.com/gnolang/gno/tm2/pkg/sdk/vm.(*VMKeeper).initBuiltinPackagesAndTypes.func1({0xc006685951, 0x5})
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/builtins.go:35 +0x20c
github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).GetPackage(0xc00025e360, {0xc006685951, 0x5}, 0xd8?)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/store.go:162 +0x1e2
github.com/gnolang/gno/gnovm/pkg/gnolang.tryPredefine({0xfa6498, 0xc00025e360}, {0xfa3ef8, 0xc003dc4580}, {0xf9e710, 0xc00607b380?})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2967 +0x15f
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow2({0xfa6498, 0xc00025e360}, {0xfa3ef8?, 0xc003dc4580}, {0xf9e710, 0xc00607b380?}, 0x423165?)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2870 +0x125
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow({0xfa6498, 0xc00025e360}, {0xfa3ef8, 0xc003dc4580}, {0xf9e710, 0xc00607b380})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2859 +0x149
github.com/gnolang/gno/gnovm/pkg/gnolang.PredefineFileSet({0xfa6498, 0xc00025e360}, 0xc003dc5340, 0xc001c47ed8)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:38 +0x6c5
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).runFiles(0xc005484360, {0xc008e70988, 0x1, 0x1})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:411 +0x291
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunFiles(...)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:377
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunMemPackage(0xc005484360, 0xc00a427980, 0x1)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:234 +0x216
github.com/gnolang/gno/tm2/pkg/sdk/vm.(*VMKeeper).AddPackage(_, {{0xf95b08, 0xc004245050}, 0x2, {0xf95700, 0xc0046aee10}, {0xf95c90, 0xc00163f340}, {0xc00153499d, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/keeper.go:180 +0x88a
github.com/gnolang/gno/tm2/pkg/sdk/vm.vmHandler.handleMsgAddPackage({_}, {{0xf95b08, 0xc004245050}, 0x2, {0xf95700, 0xc0046aee10}, {0xf95c90, 0xc00163f340}, {0xc00153499d, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/handler.go:46 +0x2a5
github.com/gnolang/gno/tm2/pkg/sdk/vm.vmHandler.Process({_}, {{0xf95b08, 0xc004245050}, 0x2, {0xf95700, 0xc0046aee10}, {0xf95c90, 0xc00163f340}, {0xc00153499d, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/handler.go:27 +0x205
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runMsgs(_, {{0xf95b08, 0xc004245050}, 0x2, {0xf95700, 0xc0046aee10}, {0xf95c90, 0xc00163f340}, {0xc00153499d, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:644 +0x2ed
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runTx(0xc000236100, 0x2, {0xc0060d7400, 0x268, _}, {{0xc0046ae080, 0x1, 0x1}, {0x1e8480, {{0xc00689dbf7, ...}, ...}}, ...})
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:823 +0x965
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).DeliverTx(0x0?, {{}, {0xc0060d7400?, 0x0?, 0x0?}})
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:580 +0x17d
github.com/gnolang/gno/tm2/pkg/bft/abci/client.(*localClient).DeliverTxAsync(0xc0005710e0, {{}, {0xc0060d7400, 0x268, 0x268}})
        /home/zns/Documents/gno-main/tm2/pkg/bft/abci/client/local_client.go:82 +0xfc
github.com/gnolang/gno/tm2/pkg/bft/proxy.(*appConnConsensus).DeliverTxAsync(0x0?, {{}, {0xc0060d7400?, 0x0?, 0x0?}})
        /home/zns/Documents/gno-main/tm2/pkg/bft/proxy/app_conn.go:73 +0x26
github.com/gnolang/gno/tm2/pkg/bft/state.execBlockOnProxyApp({0xf96968, 0xc0095fa090}, {0xf99030, 0xc001938690}, 0xc00563ad00, {0xf9e8f0, 0xc0001a4428})
        /home/zns/Documents/gno-main/tm2/pkg/bft/state/execution.go:253 +0x5aa
github.com/gnolang/gno/tm2/pkg/bft/state.(*BlockExecutor).ApplyBlock(_, {{0xd3785c, 0xb}, {0xd3785c, 0xb}, {0x0, 0x0}, {0xc008d6d47d, 0x3}, 0x12, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/bft/state/execution.go:102 +0x115
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).finalizeCommit(0xc0024db800, 0x13)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1347 +0x97e
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).tryFinalizeCommit(0xc0024db800, 0x13)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1275 +0x313
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).enterCommit.func1()
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1221 +0x97
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).enterCommit(0xc0024db800, 0x13, 0x0)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1252 +0xb03
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).addVote(0xc0024db800, 0xc00681d040, {0x0, 0x0})
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1637 +0x913
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).tryAddVote(0xc0024db800, 0xf?, {0x0?, 0x0?})
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1483 +0x27
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).handleMsg(0xc0024db800, {{0xf8f2c0, 0xc008e70470}, {0x0, 0x0}})
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:691 +0x318
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).receiveRoutine(0xc0024db800, 0x0)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:650 +0x42c
created by github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).OnStart
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:344 +0x4af

--= /Error =--

I am going to dig in a little bit to see if I can figure out why bufio is a problem, but please let me know if anyone has any hints.

Edit: the error is reproducible in the simpler code:

package writebyte

import (
    "bufio"
)

func WriteByte() (data string) {
    var w bufio.Writer
    _ = w
    return
}

Edit2: This particular WritePerByte error does go away if the gas is increased. So this issue is solved by increasing --gas-wanted to 5000000. However, the original problem (adding bytebeat) does not work due to a new error that occurs after increasing the gas:

new error
$ gnokey maketx addpkg --pkgpath "gno.land/p/demo/audio/bytebeat" --pkgdir "examples/gno.land/p/demo/audio/bytebeat" --deposit 100000000ugnot --gas-fee 1000000ugnot --gas-wanted 5000000 --broadcast --chainid dev --remote localhost:26657 --insecure-password-stdin=true  zzkey1
...
.level 0 .msg Invalid tx [error internal error log recovered: gno.land/p/demo/audio/bytebeat/bytebeat.gno:1: should not happen
stack:
goroutine 58 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runTx.func1()
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:743 +0x2cd
panic({0xca1b20, 0xc0038e0a80})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow.func1()
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2854 +0x2d2
panic({0xc22a60, 0xf8b8d0})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).SetCacheType(0xc0001e6360, {0xf975b0, 0xc0009aca20})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/store.go:412 +0xed
github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).GetPackage(0xc0001e6360, {0xc0037535b1, 0x5}, 0xd8?)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/store.go:193 +0x825
github.com/gnolang/gno/gnovm/pkg/gnolang.tryPredefine({0xfa64d8, 0xc0001e6360}, {0xfa3f38, 0xc00153c2c0}, {0xf9e750, 0xc00cce4480?})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2967 +0x15f
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow2({0xfa64d8, 0xc0001e6360}, {0xfa3f38?, 0xc00153c2c0}, {0xf9e750, 0xc00cce4480?}, 0x4508b2?)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2870 +0x125
github.com/gnolang/gno/gnovm/pkg/gnolang.predefineNow({0xfa64d8, 0xc0001e6360}, {0xfa3f38, 0xc00153c2c0}, {0xf9e750, 0xc00cce4480})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:2859 +0x149
github.com/gnolang/gno/gnovm/pkg/gnolang.PredefineFileSet({0xfa64d8, 0xc0001e6360}, 0xc00153d600, 0xc00a7249a8)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/preprocess.go:38 +0x6c5
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).runFiles(0xc0024ab200, {0xc004bb8ea8, 0x1, 0x1})
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:411 +0x291
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunFiles(...)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:377
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunMemPackage(0xc0024ab200, 0xc00baea280, 0x1)
        /home/zns/Documents/gno-main/gnovm/pkg/gnolang/machine.go:234 +0x216
github.com/gnolang/gno/tm2/pkg/sdk/vm.(*VMKeeper).AddPackage(_, {{0xf95b48, 0xc00b643260}, 0x2, {0xf95740, 0xc00888efa0}, {0xf95cd0, 0xc00653f4a0}, {0xc00bb501fd, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/keeper.go:180 +0x88a
github.com/gnolang/gno/tm2/pkg/sdk/vm.vmHandler.handleMsgAddPackage({_}, {{0xf95b48, 0xc00b643260}, 0x2, {0xf95740, 0xc00888efa0}, {0xf95cd0, 0xc00653f4a0}, {0xc00bb501fd, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/handler.go:46 +0x2a5
github.com/gnolang/gno/tm2/pkg/sdk/vm.vmHandler.Process({_}, {{0xf95b48, 0xc00b643260}, 0x2, {0xf95740, 0xc00888efa0}, {0xf95cd0, 0xc00653f4a0}, {0xc00bb501fd, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/vm/handler.go:27 +0x205
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runMsgs(_, {{0xf95b48, 0xc00b643260}, 0x2, {0xf95740, 0xc00888efa0}, {0xf95cd0, 0xc00653f4a0}, {0xc00bb501fd, 0x3}, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:644 +0x2ed
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).runTx(0xc0001be100, 0x2, {0xc001634000, 0x9cb, _}, {{0xc00888e260, 0x1, 0x1}, {0x4c4b40, {{0xc0082f79b7, ...}, ...}}, ...})
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:823 +0x965
github.com/gnolang/gno/tm2/pkg/sdk.(*BaseApp).DeliverTx(0x0?, {{}, {0xc001634000?, 0x0?, 0x0?}})
        /home/zns/Documents/gno-main/tm2/pkg/sdk/baseapp.go:580 +0x17d
github.com/gnolang/gno/tm2/pkg/bft/abci/client.(*localClient).DeliverTxAsync(0xc0004d3ec0, {{}, {0xc001634000, 0x9cb, 0x9cb}})
        /home/zns/Documents/gno-main/tm2/pkg/bft/abci/client/local_client.go:82 +0xfc
github.com/gnolang/gno/tm2/pkg/bft/proxy.(*appConnConsensus).DeliverTxAsync(0x0?, {{}, {0xc001634000?, 0x0?, 0x0?}})
        /home/zns/Documents/gno-main/tm2/pkg/bft/proxy/app_conn.go:73 +0x26
github.com/gnolang/gno/tm2/pkg/bft/state.execBlockOnProxyApp({0xf969a8, 0xc00825e3f0}, {0xf99070, 0xc00195a640}, 0xc001856b60, {0xf9e930, 0xc00012a030})
        /home/zns/Documents/gno-main/tm2/pkg/bft/state/execution.go:253 +0x5aa
github.com/gnolang/gno/tm2/pkg/bft/state.(*BlockExecutor).ApplyBlock(_, {{0xd37873, 0xb}, {0xd37873, 0xb}, {0x0, 0x0}, {0xc0057b4d7d, 0x3}, 0xb, ...}, ...)
        /home/zns/Documents/gno-main/tm2/pkg/bft/state/execution.go:102 +0x115
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).finalizeCommit(0xc00a2c5b00, 0xc)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1347 +0x97e
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).tryFinalizeCommit(0xc00a2c5b00, 0xc)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1275 +0x313
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).enterCommit.func1()
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1221 +0x97
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).enterCommit(0xc00a2c5b00, 0xc, 0x0)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1252 +0xb03
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).addVote(0xc00a2c5b00, 0xc002cb8d20, {0x0, 0x0})
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1637 +0x913
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).tryAddVote(0xc00a2c5b00, 0xf?, {0x0?, 0x0?})
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:1483 +0x27
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).handleMsg(0xc00a2c5b00, {{0xf8f300, 0xc004bb8948}, {0x0, 0x0}})
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:691 +0x318
github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).receiveRoutine(0xc00a2c5b00, 0x0)
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:650 +0x42c
created by github.com/gnolang/gno/tm2/pkg/bft/consensus.(*ConsensusState).OnStart
        /home/zns/Documents/gno-main/tm2/pkg/bft/consensus/state.go:344 +0x4af

Edit3: Brilliant, the cherry-picked logs found the error: 0 /home/zns/Documents/gno-main/tm2/pkg/crypto/keys/client/addpkg.go:211 - deliver transaction failed: log:recovered: encoding/base64/base64.gno:6: unknown import path encoding/binary. I'll work on fixing the encoding/base64. Will make a new issue to track this.