-
Notifications
You must be signed in to change notification settings - Fork 136
multi: btcsuite and go-ethereum updates #1542
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
Conversation
|
Comment has |
|
The go-ethereum update to 1.10.17 is related to the btcec/v2 update since go-ethereum was using the btcd module before that patch. This is what I'm describing in the first bullet. |
|
Oh, I'm sorry. I guess I have a reading problem. The first bullet explained it. |
6b74ed4 to
c4f249f
Compare
|
There will be more to come with btcsuite/btcd#1825 and other module changes in the btcsuite repos, but this is working as is to allow us to freely update both btcsuite and go-ethereum modules. |
|
Will update the go-ethereum require to use ethereum/go-ethereum#24649 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't get the core live tests to pass (passing on master), but maybe just need a rebase? Everything else seems good to go.
Specifically, running TestNoMakerRedeem, first I got a
trade_simnet_test.go:937: client 2 reported 1 incomplete trades for order b4aefa89 after 2m0s
then subsequent tests gave
trade_simnet_test.go:299: error starting clients: dcr wallet authentication error: -4: encryption/decryption error: account is not encrypted with a unique passphrase
|
Yeah I think I need to rebase with #1582 merged. |
btcutil and btcec/v2 are now sub-modules in the btcd repo.
The updated txscript.NewTxSigHashes requires a PrevOutFetcher for detecting a taproot output. In this change, we provide a dummy fetcher that always returns a wire.TxOut with a nil pkScript that so txscript.IsPayToTaproot returns false.
The updated btcwallet/wallet.(*Wallet).SendOutputs method has a CoinSelectionStrategy argument. Pass CoinSelectionLargest to keep existing behavior. The other option is CoinSelectionRandom.
The updated txscript.ExtractPkScriptAddrs always returns a nil error. Keep the error return on ExtractScriptAddrs for now since it was not removed from ExtractPkScriptAddrs and it could have meaning again.
|
Rebased but not re-tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing well. lgtm
|
Sorry I know that creates more conflicts, again, but this one has been getting rebased for months |
|
Oh fft go-ethereum 1.10.18 was released this morning. 🤦 |
A number of updates in the btcsuite universe have created new sub-modules, and introduced breaking changes to several packages. This work adapts to the changes:
btcec/v2was created as a new module. The was important so that go-ethereum, which imports btcec for it's no-cgocryptopackage, could break free from the btcd mega-module that did not follow semantic import versioning, creating challenges with breaking changes with minor version updates. The migration ofgo-ethereum/cryptoto the newbtcec/v2module was done in crypto: use btcec/v2 for no-cgo ethereum/go-ethereum#24533btcec/v2is primarily type aliases intodcrd/secp256k1/v4, a number of syntax changes are made similar todcrecbtcutilwas moved from it's own repo (github.com/btcsuite/btcutil) into a new submodule in the btcd repo (github.com/btcsuite/btcd/btcutil)txscriptwas updated for taproot support, and there were a few breaking changes. Namely,NewTxSigHashesrequires aPrevOutFetcherfor taproot support, andExtractPkScriptAddrsno longer returns an error for invalid/non-standard scripts.github.com/btcsuite/btcwallet/walletwas updated to use the newtxscriptand there was a syntax change towallet.(*Wallet).SendOutputsgitproxy.zycloud.tk/btcsuite/btcwalletitself was updated for the above changesThere will be more btcsuite module changes in the near future, including the introduction of
wire,chaincfg,btcutil/address, andtxscriptmodules tobtcd(see btcsuite/btcd#1825), as well as corresponding updates tobtcwallet, but this starts the processes and moves to ago-ethereumversion that does not require thebtcdmega-module that is not friendly to Go consumers.