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

Merge #10

Open
wants to merge 127 commits into
base: 2018/03/wallet_new
Choose a base branch
from
Open

Merge #10

wants to merge 127 commits into from

Conversation

xloem
Copy link

@xloem xloem commented Mar 27, 2021

This merges libbtc changes into your wallet_new wip pull request, resolving conflicts.

Please relate things that would make this easier or better.

sergey-chernikov and others added 30 commits May 3, 2017 19:57
85122a7 Fix bech32 issue (from upstream) (Jonas Schnelli)
9689fca Refactor P2PKH, P2SH_P2WPKH address generation (Jonas Schnelli)
29c053b Add some unit tests for btc_tx_sign() (Jonas Schnelli)
c09a355 Add support for P2SH-P2WPKH (signing and address derivation) (Jonas Schnelli)
b0ebbe5 Fix memory leak in tx deserialization (Jonas Schnelli)
9366090 Improve bitcoin signing tool, move it to tx.c (Jonas Schnelli)
8154c0a Fix some const_ness (Jonas Schnelli)
4ebef0e Add P2WPKH script detection (Jonas Schnelli)
27478c1 Add script_type to string helper function (Jonas Schnelli)
e9daa45 Factor out WIF encode/decode (Jonas Schnelli)
361d213 Improve memory cleanse (Jonas Schnelli)
703c4e0 Don't ignore unsupported Base58 encoded addresses (Jonas Schnelli)
dedfa2d Add bitcoin signing tool (Jonas Schnelli)
ef453da Minor fixes (expose has witness in API, avoid prining privkey if not present) (Jonas Schnelli)
242d1d6 Detect invalid deserialization in net code (Jonas Schnelli)

Pull request description:

  Adds a new function `btc_tx_sign_input(btc_tx *tx_in_out, const cstring *script, uint64_t amount, const btc_key *privkey, int inputindex, int sighashtype, uint8_t *sigcompact_out, uint8_t *sigder_out, int *sigder_len);`
  to the `btc_tx_*` space.

  The function is currently capable of applying a signature to an P2PKH, P2WPKH (native SegWit) input.

  Adds also a "sign" command to `bitcointool`.

Tree-SHA512: 04fbb8251f4e977276e370a5f74bfbbe0dabca527fa62c555d3bdfbe34578be3dd7647980b1c727606c5be890daef677e386381a05e6906b0b3101e07419b05c
da5b66b Add bech32 decode in btc_tx_add_address_out() (Jonas Schnelli)
609e941 Fix coverall (Jonas Schnelli)
b631dcd Add support for range based hdderive to bitcointool (Jonas Schnelli)
9f9b00c Fix bug in btc_pubkey_getaddr_p2pkh() (Jonas Schnelli)
9645371 Add support for Bech32 (bc1) addresses (Jonas Schnelli)

Pull request description:

Tree-SHA512: 82bdffde3a7631731fcc816f708316713c9817acf3656a10384831098d682ed77f2bce1a4f7e13127aba2e0fe3095b6073822d681d24f18f22a7eb2538c5b5cf
This avoids confusion with libevent 1.4 in base on OpenBSD.
Libbtc only uses the core functionality, and libevent thankfully
ships separated into multiple smaller libraries by default, so
this shouldn't cause any portability issues.
1a797c0 Added WITH_NET include guard in commontools (Mike Owens)

Pull request description:

  Fixes compile error with building with --disable-net.

Tree-SHA512: 0bf8e1e65b974d073388bcf395b032450ee1a45903394bb28c51b3a8faeb3f200f235efb37169bf6b1ccd04cd492bf7c92cc9a4c1ef5a65d5c613115ebb77fc3
0b64ab0 add some additional files to .gitignore (Evan Klitzke)

Pull request description:

  Thank you for this great resource, it's been instrumental in helping me understand the protocol. After building libbtc and running `bitcoin-spv -t scan` I get some junk according to `git status`:
   * The bitcoin-spv and bitcoin-txref targets aren't ignored
   * bitcoin-spv creates files named headers.db and wallet.db that aren't ignored

Tree-SHA512: 094242f3a81fa5c39ab2075792de4b108b82238e64952badcd1729f942fd2940a1c336b563e9cfc60c82086cd8dab9cb5f4236a58395bb305622326541f6dc76
5873f02 Cast a void pointer to a struct btc_btree_node* (cupnoodlegirl)

Pull request description:

Tree-SHA512: bcc47fe8347f57532596862c2e7a7ac48ed8210a851247c1f3a8c8c0180bfe38572635709c7d331f8180cb405d1ee14ca0ddadd193e47f8fded950c063dd7dbf
4a8d19b Clean up headers (cupnoodlegirl)

Pull request description:

Tree-SHA512: 1f02b4484e0ce3a56e91d695ef4146d4e001c763083d4c45b7028264d77479c8df11743033dde2713f59e4f7531feca6f2166bb9280c3977f79baef9a419b490
d7bb778 Removed unused btc_script_extract_pkh (Jonas Schnelli)
53a821d print xpub and xpriv bip32maintotest tool (Jonas Schnelli)
5b8c96d Print the P2WPKH address (bech32) in hd_print_node (Jonas Schnelli)
1ee4a88 Add btc_hash_set function (Jonas Schnelli)
bbca49c Fix constness in bip32.c/.h (Jonas Schnelli)
6938a5c Add btc_p2wpkh_addr_from_hash160 &  p2pkh_addr_from_hash160 to base58.c/.h (Jonas Schnelli)

Pull request description:

Tree-SHA512: c24bc95aeed572bce0615e6e1a13862fc3a7227fdd6ec24c90f60b5555d9171f9900d47af54751e252cbf59dde1b5fb2a3df01897da2136ff3aa9973163e0a7a
xloem added 29 commits March 26, 2021 16:50
Added btc_p2sh_addr_from_hash160() function to hash redeem scripts to addresses + fix assert issues
@ChristopherA commented on Jul 9, 2017
When I install this on a minimal Debian 8-based machine (chosen for more security as opposed to my normal Macintosh development environment) the short 3-step build instructions in the README.md are incomplete.

In my case I needed to also install some non-default development tools sudo apt-get install autoconf libtool libevent-dev. Quite possibly there are some other tools that are required but I installed previously. The README.md should probably list any toolchain dependencies.

@tomryanx commented on Aug 27, 2017
On OpenBSD, autoconf automake libtool libevent, and possibly libeventextra all need to be installed. Configure doesn't find /usr/local/include/event2/event.h by itself, either.
Re-enable valgrind and check testing, fixing discovered issues
Link with -levent_core rather than -levent

Fixes libbtc#103.
Additional build notes needed for README.md

Fixes libbtc#95.
Add BIP-157/158 service bit and P2P message constants

Stub, to help others work off of it.
Removing unused variables from wallet.c
Add build dependencies in clean [Ubuntu 18.04]

This appears the same as debian, so I merged it with the debian dependencies.
fix compilation error: wallet.h on c++
specify subfolders when installing header files
Update missing headers in configure.ac
fixes libbtc#135 @andrade Include `memory.h` minor fix

`src/bip32.c` has `#include "memory.h"`. Should that be `#include <btc/memory.h>`?

https://github.com/libbtc/libbtc/blob/master/src/bip32.c#L41
Normalise alloc/free usage more
Resolves pending conflicts.
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.