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

Adding bitcoin support #7

Merged
merged 76 commits into from
Oct 2, 2024
Merged

Adding bitcoin support #7

merged 76 commits into from
Oct 2, 2024

Conversation

EdsonAlcala
Copy link
Owner

@EdsonAlcala EdsonAlcala commented Sep 25, 2024

What changed? Why?

This PR includes many improvements with regards to serialisation and usage of the library. Including full support for Near actions.

The changes include:

  • Included integration tests for Bitcoin transactions, this included adding the bitcoind binary to the project to facilitate the execution of the integration tests in the github environment. Also, the matrix for integration tests was simplified to only run the integration tests against Ubuntu machines, this change will be temporary until we find a better way to run integration tests against MacOS.
  • Caching of Github actions was improved.
  • Enabled features, so that consumers can define "near", "bitcoin" or "evm". This change should improve the final size of smart contracts for consumers.
  • Added Bitcoin types with their respective encoding and decoding functions, these include:
    • LockTime
    • Height
    • Time
    • ScriptBuf
    • SigHash
    • TransactionType
    • Hash
    • Outpoint
    • Sequence
    • TxId
    • TxIn
    • Witness
    • Amount
    • TxOut
    • Version

Most of these structs are copied or minimal implementations of Rust-Bitcoin that unfortunately hasn't finished the migration of the main types and their respective encoding rules to the bitcoin-primitives package. For instance the following issue is still in progress rust-bitcoin/rust-bitcoin#3406.

Notes to reviewers

The build_with_witness is still not working, I'm facing problems during the propagation. We need to include a successful integration test that propagates the encoded transaction with a witness.

How has it been tested?

  • Included 1 integration test for p2pkh sighash.
  • Included 1 integration test for p2wpkh sighash.

@EdsonAlcala EdsonAlcala merged commit af603f7 into master Oct 2, 2024
17 checks passed
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.

1 participant