Skip to content

bad-txns-inputs-missingorspent when create a new block #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
HarvestStars opened this issue Oct 14, 2019 · 1 comment
Open

bad-txns-inputs-missingorspent when create a new block #36

HarvestStars opened this issue Oct 14, 2019 · 1 comment

Comments

@HarvestStars
Copy link
Contributor

HarvestStars commented Oct 14, 2019

Hi, there is an error when my lavad created a new block after the deadline was up:

2019-10-12T10:20:39Z UpdateTip: new best=3edded72a0f0590e51322ef099f19841c6093dc2acb8155c48376910c07f64a8 height=16109 version=0x20000000 log2_work=64.148842 tx=40456 date='2019-10-12T10:07:33Z' progress=0.000088 cache=0.5MiB(3477txo)
2019-10-12T10:20:39Z UpdateTip: new best=ecd49f3656ae01b29b20c134cc33a46b519296d3a7f33c0574243bcdda3266f3 height=16110 version=0x20000000 log2_work=64.148852 tx=40459 date='2019-10-12T10:20:08Z' progress=0.000088 cache=0.5MiB(3530txo)
2019-10-12T10:20:41Z Update new deadline: 51690, now: 1570875641, target: 1570927298
2019-10-12T10:20:41Z Update new deadline: 18253, now: 1570875641, target: 1570893861
2019-10-12T10:20:41Z Update new deadline: 3342, now: 1570875641, target: 1570878950
2019-10-12T10:20:47Z Update new deadline: 813, now: 1570875647, target: 1570876421
2019-10-12T10:21:06Z Update new deadline: 256, now: 1570875666, target: 1570875864
2019-10-12T10:24:24Z CPOCBlockAssember CreateNewBlock, plotid: 8343434995659376128 nonce:7249906519332005814 newheight:16111 deadline:32905846 utc:1570875864
2019-10-12T10:24:24Z CreateNewBlock(): block weight: 53858 txs: 31 fees: 51048 sigops 534
2019-10-12T10:24:24Z ERROR: ConnectBlock: Consensus::CheckTxInputs: 1ac00961624fe7b785cd5c2e78a30e49ccc9a85d553e11382a1ce99f70b86a7c, bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)
2019-10-12T10:24:24Z 

************************
EXCEPTION: St13runtime_error       
CreateNewBlock: TestBlockValidity failed: bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)       
Lava in scheduler       

2019-10-12T10:25:01Z 

Environment:
My system is ubuntu 16.04 64, and my lavad version is v0.3.1.

details:
when my deadline is over, the node mined a new block, then the error came up. the tx 1ac00961624fe7b785cd5c2e78a30e49ccc9a85d553e11382a1ce99f70b86a7c is a firestone release tx. and here is the code about this error:

bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee)
{
    // are the actual inputs available?
    if (!inputs.HaveInputs(tx)) {
        return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-missingorspent", false,
                         strprintf("%s: inputs missing/spent", __func__));
    }
  ......
}

That means the inputs had no this related tx, but why is that?
I found the tx's prevtx hash is 029bad8e44553c1c68c5187cd4df8fb23388bd16ce467976c101de12bbff3c38, the second output of which is used here by the error tx 1ac00961624fe7b785cd5c2e78a30e49ccc9a85d553e11382a1ce99f70b86a7c.
However, at that moment, this prev tx is seems not in the inputs cache.
Anyone can help?

Log file
error of tx bad.log

@Networktoken
Copy link

一样的!我也是,第一个区块无法生成!
POC2 Deadline inconformity 2510146028316ul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants