0

I am trying to do a pegged transfer from one of my private blockchain to a sidechains using sidechain-manipulation.py (https://github.com/ElementsProject/elements/blob/alpha/contrib/sidechain-manipulation.py)

I did a successful address creation and send-to-sidechain after doing necesary modifications on Sidechain chainparams(presently configured only for main and testnet)

While I try to claim in the sidechain I get the following error

Traceback (most recent call last):
  File "./contrib/sidechain-manipulation.py", line 176, in <module>
    txid = sidechain.sendrawtransaction(res_tx)
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 140, in __call__
    raise JSONRPCException(response['error'])
JSONRPCException: -26: 16: mandatory-script-verify-flag-failed (Script failed an OP_CHECKSIGVERIFY operation)

Got the following error from an RPC Call:
{u'message': u'16: mandatory-script-verify-flag-failed (Script failed an OP_CHECKSIGVERIFY operation)', u'code': -26}

I see the following lines in claim-on-sidechains sidechain-manipulation.py,

    # Might need to calculate the scriptSig here
    secondScriptSig = "1"

My question is, what is this secondScriptSig ?!?! How does it relate to withdrawKeys?

1

The secondScriptSig is a script in each transfer transaction which satisfies the chain-global secondScriptPubKey. The secondScriptPubKey is intended to allow, in a flexible way, each chain to define its own additional terms. For example, a chain may restrict transfers to only be allowed if they are co-signed by a multisig federation (in the full federated peg mode), or restrict the total value which may be pulled out of a sidechain in individual transfers. In alpha, it is effectively unused - hence the secondScriptSig simply being the constant script "OP_TRUE".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.