不能 debug.traceTransaction 在 geth 中:"missing trie node"

Cannot debug.traceTransaction in geth: "missing trie node"

我只能使用我的 geth 跟踪在过去 2 到 3 小时内执行的交易,我在执行了 5 小时或更长时间的交易中收到以下错误:

> debug.traceTransaction('0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060');
    Error: missing trie node 
    691fc4f4d21d10787902e8f3266711f1d640e75fedbeb406dc0b8d3096128436 (path )
        at web3.js:3143:20
        at web3.js:6347:15
        at web3.js:5081:36
        at <anonymous>:1:1

> debug.traceTransaction('0x19f1df2c7ee6b464720ad28e903aeda1a5ad8780afc22f0b960827bd4fcf656d');
Error: missing trie node 5412c03b1c22d01fe37fc92d721ab617f94699f9d59a6e68479145412af3edae (path )
    at web3.js:3143:20
    at web3.js:6347:15
    at web3.js:5081:36
    at <anonymous>:1:1

Geth 节点已完全同步:

> eth.syncing
false

我运行它用下面的命令:

geth --port XXX --datadir XXX --rpcport XXX --rpc --rpcapi admin,debug,miner,shh,txpool,personal,eth,net,web3 console

我已经尝试了两个 geth 版本 1.7.01.7.2。删除区块链数据库并重新同步没有帮助。

遇到问题怎么办?

Geth 默认使用快速同步。使用 --syncmode=full 进行完全同步。目前完整的数据库大小超过 200Gb。


答案在这里找到:https://github.com/ethereum/go-ethereum/issues/15088

这里描述原因:https://blog.ethereum.org/2015/06/26/state-tree-pruning/