<p>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".</p>

CC BY-SA 3.0
2015-07-27T21:55:19.683Z
2015-07-27T21:55:19.683Z
Matt Corallo
<p>I am trying to do a pegged transfer from one of my private blockchain to a sidechains using sidechain-manipulation.py (<a href="https://github.com/ElementsProject/elements/blob/alpha/contrib/sidechain-manipulation.py" rel="nofollow">https://github.com/ElementsProject/elements/blob/alpha/contrib/sidechain-manipulation.py</a>)</p>

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

<p>While I try to claim in the sidechain I get the following error</p>

<pre><code>Traceback (most recent call last):
  File "./contrib/sidechain-manipulation.py", line 176, in &lt;module&gt;
    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}
</code></pre>

<p>I see the following lines in claim-on-sidechains sidechain-manipulation.py,</p>

<pre><code>    # Might need to calculate the scriptSig here
    secondScriptSig = "1"
</code></pre>

<p>My question is, what is this secondScriptSig ?!?! How does it relate to withdrawKeys?</p>

<sidechains><private-blockchains>
Pegged transfer from private blockchain to sidechains - Issue
Subbu
# Pegged transfer from private blockchain to sidechains - Issue

(Asked by: username_0 on 2015-07-27)

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?

**Tags:** sidechains, private-blockchains


---

## 1 answers

### Answer by username_1 on 2015-07-27. Score: 1 | Accepted answer

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".


---

