Skip to content

Conversation

@jachiang
Copy link
Contributor

@jachiang jachiang commented Sep 2, 2019

This is the first part of the workshop after the Schnorr chapters, and also the first chapter where participants begin to construct transactions (for broadcast).

@jachiang jachiang changed the title Added chapter 2.1 (Segwit v1 outputs) Added Jupyter chapter 2.1 (Segwit v1 outputs) Sep 2, 2019
@jachiang jachiang changed the title Added Jupyter chapter 2.1 (Segwit v1 outputs) Added Jupyter Chapter 2.1 (Segwit v1 outputs) Sep 2, 2019
@jnewbery
Copy link
Contributor

jnewbery commented Sep 4, 2019

rebased on master

@jachiang
Copy link
Contributor Author

Updated for this branch.

@jnewbery
Copy link
Contributor

rebased on master

@jnewbery
Copy link
Contributor

pushed a commit addressing some nits

@elichai
Copy link
Collaborator

elichai commented Sep 18, 2019

Need to update assertions over the version.
assert version == '/OptechTaproot:0.1.2(testnode0)/' instead of 0.1.1

@elichai
Copy link
Collaborator

elichai commented Sep 18, 2019

What do you think about using COIN to convert the weird floats the RPC returns to satoshis? (it's in messages.py) or do you prefer multiplying by 100,000,000?

Copy link
Collaborator

@elichai elichai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits. but other than that looks great :)

@elichai elichai self-requested a review September 18, 2019 12:05
Copy link
Collaborator

@elichai elichai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits. everything looks great except that the answers don't work for me.

It all works fine until:

# Construct transaction witness
witness = CScriptWitness()
witness.stack.append(sig_agg)
witness_in = CTxInWitness()
witness_in.scriptWitness = witness
spending_tx.wit.vtxinwit.append(witness_in)
 
# Serialize Schnorr transaction for broadcast
spending_tx_str = spending_tx.serialize().hex()
 
# Test mempool acceptance
print(test.nodes[0].testmempoolaccept([spending_tx_str]))

Which gives me:

[{'txid': '3ec5138e77b3a9d179adf65084ba57742521f45b22c30cc56cb3f132e88dd6c4', 'allowed': False, 'reject-reason': '64: non-mandatory-script-verify-flag (Invalid signature for taproot key path spending)'}]

- add more introduction
- remove Part B from the exercise
- much more
@jnewbery
Copy link
Contributor

All review comments addressed. Time to merge.

@jnewbery jnewbery merged commit bf5d7c9 into bitcoinops:master Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants