GithubHelp home page GithubHelp logo

Comments (4)

apoelstra avatar apoelstra commented on September 24, 2024

Hi @Christewart, sorry for the delay in investigating this. This is a bug in sidechain-manipulation.py.

It's an alpha consensus rule that any sidechain claim transactions have a locked sidechain output as input, then your address as output, follow immediately by a change output whose scriptPubKey is identical to the scriptPubKey of the original locked output. That is, you are "putting the change back where it came from".

In sidechain-manipulation.py:231 the change output is hardcoded to be the same as the alpha genesis output (which describes 21m coins with no corresponding locked Testnet output). However, the genesis output is not the only locked sidechain output; there are other outputs which correspond to coins users have locked when withdrawing from Alpha to Testnet.

So the bug you're seeing is that sidechain-manipulation.py is trying to unlock some locked output created by some user (so it does not originate from the genesis output), then send the coins (a) to you, and (b) "back" to the genesis output.

So the script needs to be fixed to look at which output it's spending, and to use that.

cc @TheBlueMatt can I just have UTXOFinder store its scriptpubkey then assign that to relock_scriptPubKey on line 231?

from elements.

TomMcCabe avatar TomMcCabe commented on September 24, 2024

@Sarodh The secondScriptPubKeyHash is just the hash of the secondScriptPubKey.

secondScriptPubKey: OP_DROP 144 OP_LESSTHANOREQUAL (from sidechain-manipulation.py)

In hex: 75029000a1

Sha256(Ripemd160(secondScriptPubKey)) == 9eac001049d5c38ece8996485418421f4a01e2d7

from elements.

Sarodh avatar Sarodh commented on September 24, 2024

Thanks @TomMcCabe

from elements.

instagibbs avatar instagibbs commented on September 24, 2024

peg-in system was overhauled

from elements.

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.