lightninglabs / taproot-assets

A layer 1 daemon, for the Taproot Assets Protocol specification, written in Go (golang)
MIT License
460 stars 110 forks source link

unable to start chain porter: SQL logic error: no such column: txns.chain_fees #208

Closed bilthon closed 1 year ago

bilthon commented 1 year ago

Hi there, I'm running taro from this commit:

commit d12fd96e994ab515dc490e9a3b735eceddcb3df1 (HEAD -> main, origin/main, origin/HEAD)
Merge: 997ca91 41a34c6
Author: Oliver Gugger <gugger@gmail.com>
Date:   Mon Nov 28 12:50:32 2022 +0100

    Merge pull request #185 from halseth/list-utxos

    rpc: add ListUtxos endpoint

And I'm getting this error:

2022-11-28 17:16:34.738 [INF] CONF: Opening sqlite3 database at: /Users/bilthon/Library/Application Support/Taro/data/regtest/taro.db
2022-11-28 17:16:34.755 [INF] CONF: Attempting to establish connection to lnd...
2022-11-28 17:16:34.815 [INF] CONF: lnd connection initialized
2022-11-28 17:16:34.816 [INF] SRVR: Version: 0.1.99-alpha commit=v0.1.1-alpha-43-gd12fd96, build=production, logging=default, debuglevel=debug
2022-11-28 17:16:34.816 [INF] SRVR: Active network: regtest
2022-11-28 17:16:34.816 [INF] RPCS: Validating RPC requests based on macaroon at: /Users/bilthon/Library/Application Support/Taro/data/regtest/admin.macaroon
2022-11-28 17:16:34.817 [INF] RPCS: RPC server listening on 127.0.0.1:10029
2022-11-28 17:16:34.819 [INF] RPCS: gRPC proxy started at 127.0.0.1:8089
2022-11-28 17:16:34.819 [INF] GRDN: Starting ChainPlanter
2022-11-28 17:16:34.825 [INF] GRDN: Retrieved 1 non-finalized batches from DB
2022-11-28 17:16:34.825 [INF] GRDN: Launching ChainCaretaker(027c090ddf670b6646334516e89938b2db571fab5ed578e673cf41b83f4fccab43)
2022-11-28 17:16:34.825 [INF] GRDN: BatchCaretaker(027c090ddf670b6646334516e89938b2db571fab5ed578e673cf41b83f4fccab43), advancing from state=BatchStateFrozen to state=BatchStateBroadcast
2022-11-28 17:16:34.825 [INF] GRDN: Starting asset custodian
2022-11-28 17:16:34.825 [INF] GRDN: BatchCaretaker(027c090ddf670b6646334516e89938b2db571fab5ed578e673cf41b83f4fccab43): attempting to fund GenesisPacket
2022-11-28 17:16:34.825 [INF] GRDN: Gardener for ChainPlanter now active!
2022-11-28 17:16:34.826 [DBG] GRDN: Subscribing to new on-chain transactions
2022-11-28 17:16:34.828 [INF] GRDN: Loading pending inbound asset events
2022-11-28 17:16:34.828 [INF] GRDN: BatchCaretaker(027c090ddf670b6646334516e89938b2db571fab5ed578e673cf41b83f4fccab43): creating skeleton PSBT: (*psbt.Packet)(0xc0005ec820)({
 UnsignedTx: (*wire.MsgTx)(0xc00028c340)({
  Version: (int32) 2,
  TxIn: ([]*wire.TxIn) (cap=15) {
  },
  TxOut: ([]*wire.TxOut) (len=1 cap=15) {
   (*wire.TxOut)(0x2f88a60)({
    Value: (int64) 1000,
    PkScript: ([]uint8) (len=34 cap=34) {
     00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
     00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
     00000020  00 00                                             |..|
    }
   })
  },
  LockTime: (uint32) 0
 }),
 Inputs: ([]psbt.PInput) {
 },
 Outputs: ([]psbt.POutput) (len=1 cap=1) {
  (psbt.POutput) {
   RedeemScript: ([]uint8) <nil>,
   WitnessScript: ([]uint8) <nil>,
   Bip32Derivation: ([]*psbt.Bip32Derivation) <nil>,
   TaprootInternalKey: ([]uint8) <nil>,
   TaprootTapTree: ([]uint8) <nil>,
   TaprootBip32Derivation: ([]*psbt.TaprootBip32Derivation) <nil>
  }
 },
 Unknowns: ([]psbt.Unknown) {
 }
})

2022-11-28 17:16:34.838 [INF] FRTR: Starting ChainPorter
2022-11-28 17:16:34.838 [ERR] SRVR: Shutting down because error in main method: unable to start chain porter: SQL logic error: no such column: txns.chain_fees (1)
2022-11-28 17:16:34.841 [INF] SRVR: Shutdown complete

unable to start chain porter: SQL logic error: no such column: txns.chain_fees (1)

I might have run taro on this machine already, so if the database schema changed that could be it. Anyways, how do I reset the DB?

Roasbeef commented 1 year ago

I might have run taro on this machine already, so if the database schema changed that could be it. Anyways, how do I reset the DB?

No way to do so atm, given we're in alpha, we've just been modifying the DB schema in place instead of doing proper migrations. So for now, you'll need to wipe your state and begin anew.

guggero commented 1 year ago

Anyways, how do I reset the DB?

Just delete the .taro folder in your home directory.