Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[segnet3 hard-fork] Allow additional data in coinbase witness #60

Open
wants to merge 32 commits into
base: segwit
Choose a base branch
from

Commits on Mar 16, 2016

  1. Testchains: Don't check the genesis block

    Rebased by Pieter Wuille.
    Cleanup by Matt Corallo.
    jtimon authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    efa12a9 View commit details
    Browse the repository at this point in the history
  2. Create segnet

    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    b3f9afd View commit details
    Browse the repository at this point in the history
  3. Add segnet seed nodes

    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    0bee617 View commit details
    Browse the repository at this point in the history
  4. qt: Work (don't crash) with -segnet

    theuni authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    0b6c2e4 View commit details
    Browse the repository at this point in the history
  5. Add segregated witness transaction serialization

    Contains refactorings by Eric Lombrozo.
    Contains fixup by Nicolas Dorier.
    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    1c5149b View commit details
    Browse the repository at this point in the history
  6. Removed ppszTypeName from protocol.cpp

    CodeShark authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    af13f13 View commit details
    Browse the repository at this point in the history
  7. getdata enum issue fix

    CodeShark authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    70b54b6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    33489d6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9b180e7 View commit details
    Browse the repository at this point in the history
  10. Witness commitment validation

    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    0caed3f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    778d1e4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    712da91 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4013d1e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ce1766d View commit details
    Browse the repository at this point in the history
  15. Witness script signing

    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    f93a5ba View commit details
    Browse the repository at this point in the history
  16. Signing tests

    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    58625a7 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ab9ef68 View commit details
    Browse the repository at this point in the history
  18. Add signature version 1 with updated sighash

    Includes simplifications by Eric Lombrozo.
    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    8e01adb View commit details
    Browse the repository at this point in the history
  19. Add witness address RPCs (using P2SH)

    Includes support for pushkeyhash wit v0 by Alex Morcos.
    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    38183e6 View commit details
    Browse the repository at this point in the history
  20. Return witness data

    jl2012 authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    0724fef View commit details
    Browse the repository at this point in the history
  21. Implementing base+wit/4 block size limit rule

    Includes fixup by Suhas Daftuar.
    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    dca8111 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    616e69b View commit details
    Browse the repository at this point in the history
  23. Add rpc test for segwit

    morcos authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    156c41a View commit details
    Browse the repository at this point in the history
  24. SigOp counting in witnesses

    Includes fixup by Thomas Kerin.
    sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    0b08ed9 View commit details
    Browse the repository at this point in the history
  25. bitcoinconsensus: add method that accepts amount, and return error wh…

    …en verify_script receives VERIFY_WITNESS flag
    
    script_tests: always test bitcoinconsensus_verify_script_with_amount if VERIFY_WITNESS isn't set
    
    Rename internal method + make it static
    
    trim bitcoinconsensus_ prefix
    
    Add SERIALIZE_TRANSACTION_WITNESS flag
    afk11 authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    2161d22 View commit details
    Browse the repository at this point in the history
  26. Increase MAX_PROTOCOL_MESSAGE_LENGTH

    Witness blocks can be greater than 2MiB, but cannot be validly greater
    than 4MB.
    sdaftuar authored and sipa committed Mar 16, 2016
    Configuration menu
    Copy the full SHA
    b002a8c View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    590d715 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    99c8d54 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2016

  1. Refactor Witness commitment checks

    Break out witness commit position search and witness commitment and
    nonce check into separate functions.
    ajtowns committed Mar 17, 2016
    Configuration menu
    Copy the full SHA
    cd943d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffe4700 View commit details
    Browse the repository at this point in the history
  3. Reconsider coinbase witness commitment

    Rather than having the coinbase witness commitment be the hash of the
    concatenation of the transaction witness merkle root and a single 32-byte
    nonce from the coinbase witness, treat it instead as the merkle root
    of a tree with the leaves being the transaction witness merkle root,
    and each of the items from the coinbase stack.
    
    For the case where the coinbase witness stack contains a single, 32-byte
    item this change has no effect, however it should generalise well to allow
    the coinbase witness stack to contain an arbitrary number of elements.
    
    (If an element on the coinbase stack is not already exactly 32 bytes,
    it is first hashed before being added as a leaf to the merkle tree)
    ajtowns committed Mar 17, 2016
    Configuration menu
    Copy the full SHA
    0a25cca View commit details
    Browse the repository at this point in the history
  4. Remove restrictions on coinbase witness

    This relaxes the restriction on the coinbase witness that limited it to
    only having one entry that must be 32 bytes; instead there may be up to
    255 items on the coinbase witness stack, and they may be any length.
    
    In order to have multiple entries on the coinbase witness stack, the
    number of entries must be specified in the coinbase commitment, by
    changing the witness commitment from a 36 byte push:
    
      OP_RETURN [ 0xaa 0x21 0xa9 0xed HASH ]
    
    to a 37 byte push:
    
      OP_RETURN [ 0xaa 0x21 0xa9 0xed HASH N ]
    
    where N is the number of entries on the coinbase witness stack (from 0
    to 255).
    ajtowns committed Mar 17, 2016
    Configuration menu
    Copy the full SHA
    86c55b0 View commit details
    Browse the repository at this point in the history