Giter Site home page Giter Site logo

Comments (5)

PiRK avatar PiRK commented on August 30, 2024 1

So, when a transaction has an unsigned input, the serialized script is
41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000000000

It looks like garbage indeed.

from electrumabc.

PiRK avatar PiRK commented on August 30, 2024

The code is confusing, because of all the branching. It seems that unsigned transactions get through an "estimate_size" branch, in which a blank pubkey ("210000...") and a blank Schnorr signature ("410000...") are used in the serialization.

But simply forcing the other branch (estimate_size=Falase) does not produce a raw tx that works for "decoderawtransaction" either.

from electrumabc.

PiRK avatar PiRK commented on August 30, 2024

This could be the issue: https://github.com/Bitcoin-ABC/ElectrumABC/blob/master/electroncash/transaction.py#L673

There is additional (non standard) data added to each input when unsigned transactions are generated. So my initial assessment was wrong, it is not causes by dummy signatures being added.

Related discussions:

from electrumabc.

PiRK avatar PiRK commented on August 30, 2024

Confirmed: if I comment out that block, the hex is a proper unsigned tx that can be decoded by the node.
But it has a bunch of side effects, like being unable to sign and broadcast the generated transaction. I'll have another look at this a bit later. This is calling for a refactoring of the transaction.py module.

from electrumabc.

jasonbcox avatar jasonbcox commented on August 30, 2024

Thanks for doing a proper investigation. Looking forward to the fix.

from electrumabc.

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.