Giter Site home page Giter Site logo

Comments (6)

tohsnoom avatar tohsnoom commented on August 13, 2024

I just had this happen again while sending to a bech32 address, the client crashed the same assert failure:

Assertion failed: (tx.wit.vtxinwit.size() <= tx.vin.size()), function SerializeTransaction, file ./primitives/transaction.h, line 348.

The transaction was similar to the above, and was sending to a bech32 address within it's own wallet.

from phore.

tohsnoom avatar tohsnoom commented on August 13, 2024

I tried sending slightly smaller amounts of 250,000 tPHR to an internal wallet bech32 address, and did the same transaction twice. The first one succeeded, the 2nd one crashed with the same assertion.

from phore.

wqking avatar wqking commented on August 13, 2024

I used the GUI to send 100K tPHR several times and didn't reproduce this problem. But I doubt that it's related CLI/GUI. Seems this happens randomly so we'd better see how to reproduce it reliably.

@meyer9
For most resizing of vtxinwit, they are vtxinwit.resize(tx.vin.size()), so they should be no problem.
The only possible problem is that, in main.cpp, function UpdateUncommittedBlockStructures, there is a line block.vtx[1].wit.vtxinwit[0].scriptWitness.stack.resize(1), note in previous code it's block.vtx[0], not 1.
That function is called by GenerateCoinbaseCommitment, and GenerateCoinbaseCommitment is called only once, in miner.cpp, function CreateNewBlock.

        pblock->vtx[0].vin[0].scriptSig = CScript() << nHeight << OP_0;
        pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev);

The latest code has changed the vtx index from 0 to 1 in GenerateCoinbaseCommitment, but the previous line only operates on index 0, not 1.
I'm not sure if it's the problem.

from phore.

tohsnoom avatar tohsnoom commented on August 13, 2024

I've been able to do this mulitple times pretty reliably. I'd suggest you do the following:

  1. Take a large amount of tPHR and split it into 2000+ small inputs with the UTXO split option.
  2. Send a transaction to a bech32 address that requires a very large number of those inputs to send the required amount. If you still have a large input, use that first, then send more similar transactions right after the first one, thus forcing it to use all the smaller inputs.

from phore.

tohsnoom avatar tohsnoom commented on August 13, 2024

As another data point, I just replicated it again. First I sent a series of 500,000 tPHR transactions to bech32 addresses, all succeeded.

Then I tried a 2 million tPHR transaction and that gave a "transaction too large" error message (that's as designed).

Then I backed off the amount to 1 million, and the wallet crashed. Here are the inputs it attempted to use when it crashed:

2018-10-25 17:58:36 CWallet::SelectCoinsMinConf best subset: 250000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 4.1901165 - total 1000004.1901165
2018-10-25 17:58:36 keypool reserve 989
2018-10-25 17:58:36 CWallet::SelectCoinsMinConf best subset: 250000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 5000.00 4.1901165 - total 1000004.1901165
2018-10-25 17:58:36 CWallet::SelectCoinsMinConf best subset: 1000000.00 4.1901165 - total 1000004.1901165

from phore.

wqking avatar wqking commented on August 13, 2024

Fixed in PR #130

from phore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.