taproot-assets: panic: runtime error: index out of range [0] with length 0
I was running tarod for a long time - about 1 day creating about 3 transactions and minting a currency.
I randomly got this error when trying to pay a taro invoice.
2023-01-10 13:14:54.600 [DBG] FRTR: Got chain confirmation: 5e8635f6f7b4217f71f6cd218b94c68425f1d821dd845022a50e9e289bc8a02a
2023-01-10 13:14:54.601 [INF] FRTR: Importing receiver proof into local Proof Archive
2023-01-10 13:14:54.602 [DBG] FRTR: Updated proofs for sender and receiver (new_len=2)
2023-01-10 13:14:54.602 [INF] FRTR: Marking parcel (txid=5e8635f6f7b4217f71f6cd218b94c68425f1d821dd845022a50e9e289bc8a02a) as confirmed!
2023-01-10 13:14:54.602 [INF] PROF: Attempting to deliver receiver proof for send of asset_id=8717aa4830df7b7c3b78d79577527b9dcc9298e3a59a6acddf6366cd67c32c4c, amt=111
2023-01-10 13:14:54.602 [INF] PROF: Creating sender mailbox w/ sid=ba9e8e46fa9af2ea12c6e6be4c9af1b47de74f5de8239560a6ea86bd76d6223d25fe85a444ca35abb6465ba30a0af21431d3ee23234aa19f53e9322c1593835c
panic: runtime error: index out of range [0] with length 0
goroutine 3008 [running]:
github.com/lightninglabs/taro/tarodb.(*AssetStore).ConfirmParcelDelivery.func1({0x18dc548, 0xc00004e5c0})
/home/ec2-user/taro/tarodb/assets_store.go:1579 +0x811
github.com/lightninglabs/taro/tarodb.(*TransactionExecutor[...]).ExecTx(0xc00000e090, {0x18cfa90, 0xc000ba5dc0?}, {0x18c1ac0?, 0xc000c1dab8?}, 0xc00072dcc0?)
/home/ec2-user/taro/tarodb/interfaces.go:115 +0xe7
github.com/lightninglabs/taro/tarodb.(*AssetStore).ConfirmParcelDelivery(0xc0002eb3b0, {0x18cfa90?, 0xc000ba5dc0}, 0xc00050ed20)
/home/ec2-user/taro/tarodb/assets_store.go:1570 +0x187
github.com/lightninglabs/taro/tarofreighter.(*ChainPorter).waitForPkgConfirmation(0xc000713bf0, 0xc000116270)
/home/ec2-user/taro/tarofreighter/chain_porter.go:450 +0x1987
created by github.com/lightninglabs/taro/tarofreighter.(*ChainPorter).taroPorter
/home/ec2-user/taro/tarofreighter/chain_porter.go:243 +0x4dc
when I try to restart tarod I get the error:
$ tarod --network=testnet --debuglevel=debug --lnd.host=localhost:10009 --lnd.macaroonpath=/home/ec2-user/.lnd/data/chain/bitcoin/testnet/admin.macaroon --lnd.tlspath=/home/ec2-user/.lnd/tls.cert --tarodir=/home/ec2-user/.taro --rpclisten=127.0.0.1:10029 --restlisten=127.0.0.1:8089 --batch-minting-interval="1s"
2023-01-11 10:09:42.695 [WRN] CONF: open /home/ec2-user/.taro/taro.conf: no such file or directory
2023-01-11 10:09:42.697 [INF] CONF: Opening sqlite3 database at: /home/ec2-user/.taro/data/testnet/taro.db
2023-01-11 10:09:42.710 [INF] CONF: Attempting to establish connection to lnd...
2023-01-11 10:09:42.825 [INF] CONF: lnd connection initialized
2023-01-11 10:09:42.825 [INF] SRVR: Version: 0.1.99-alpha commit=v0.1.1-alpha-107-ge40c078, build=production, logging=default, debuglevel=debug
2023-01-11 10:09:42.825 [INF] SRVR: Active network: testnet3
2023-01-11 10:09:42.826 [INF] RPCS: Validating RPC requests based on macaroon at: /home/ec2-user/.taro/data/testnet/admin.macaroon
2023-01-11 10:09:42.826 [INF] RPCS: RPC server listening on 127.0.0.1:10029
2023-01-11 10:09:42.828 [INF] RPCS: gRPC proxy started at 127.0.0.1:8089
2023-01-11 10:09:42.828 [INF] GRDN: Starting ChainPlanter
2023-01-11 10:09:42.829 [INF] GRDN: Retrieved 0 non-finalized batches from DB
2023-01-11 10:09:42.829 [INF] GRDN: Starting asset custodian
2023-01-11 10:09:42.829 [INF] FRTR: Starting ChainPorter
2023-01-11 10:09:42.830 [INF] FRTR: Resuming delivery of 1 pending asset parcels
2023-01-11 10:09:42.830 [INF] RPCS: Starting RPC Server
2023-01-11 10:09:42.830 [INF] SRVR: Taro Daemon fully active!
2023-01-11 10:09:42.830 [INF] GRDN: Gardener for ChainPlanter now active!
2023-01-11 10:09:42.830 [DBG] GRDN: Subscribing to new on-chain transactions
2023-01-11 10:09:42.830 [INF] FRTR: Attempting to resume delivery to anchor_point=dcd539d3fcc820288fd1970bcfa70f3ee9414bd0875637d815d50115ac02aa2f:0
2023-01-11 10:09:42.830 [INF] FRTR: ChainPorter advancing from state=SendStateBroadcast to state=SendStateBroadcast
2023-01-11 10:09:42.833 [INF] GRDN: Loading pending inbound asset events
2023-01-11 10:09:42.835 [INF] FRTR: Broadcasting new transfer tx, taro_anchor_output=(*wire.TxOut)(0xc00085cba0)({
Value: (int64) 1000,
PkScript: ([]uint8) (len=34 cap=34) {
00000000 51 20 56 ba 41 6a 90 93 61 c0 2a bc 93 71 94 7d |Q V.Aj..a.*..q.}|
00000010 9b 93 7c 13 bf cc 83 09 05 83 3e b7 1b bc 8e 52 |..|.......>....R|
00000020 b8 b6 |..|
}
})
2023-01-11 10:09:42.836 [INF] GRDN: Resuming 3 pending inbound asset events
2023-01-11 10:09:42.837 [ERR] SRVR: Shutting down because error in main method: received critical error from subsystem: error fetching asset proof: sql: no rows in result set
2023-01-11 10:09:42.837 [INF] RPCS: Stopping RPC Server
2023-01-11 10:09:42.837 [INF] SRVR: Shutdown complete
received critical error from subsystem: error fetching asset proof: sql: no rows in result set
I can se the following proofs:
$ls .taro/data/testnet/proofs/
805e048249e8e3ef9c1ba68ea46d9383ff1dea95da97d83c5158ab323d8e2e7a
8717aa4830df7b7c3b78d79577527b9dcc9298e3a59a6acddf6366cd67c32c4c
99bf61def907d19fe05483536e6d62a620aabd8dc5c48bcfff26bd9cf54afe8d
f9e55584f1f1ac2340c1863948ae7367a41eaef4a486353cbc5529ae199b6fcf
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (6 by maintainers)
Yeah, the guide on that part was wrong, the
--enable_emission=false
notation doesn’t actually work. So just omitting the flag completely should fix things (after deleting the data directory and of course restarting the Taro daemon).