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

[0.5] client/asset/btc: update btcd for block deserialization failure #1936

Merged
merged 2 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
13 changes: 13 additions & 0 deletions client/asset/btc/witness_fix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ var block757922 []byte
//go:embed bitcoin-tx-7393096d97bfee8660f4100ffd61874d62f9a65de9fb6acf740c4c386990ef73.dat
var tx7393096d9 []byte

//go:embed bitcoin-tx-73be398c4bdc43709db7398106609eea2a7841aaf3a4fa2000dc18184faa2a7e.dat
var tx73be398c4 []byte

func TestBigWitness(t *testing.T) {
msgBlock := &wire.MsgBlock{}
err := msgBlock.Deserialize(bytes.NewReader(block757922))
Expand All @@ -36,4 +39,14 @@ func TestBigWitness(t *testing.T) {
if h := msgTx.TxHash().String(); h != wantHash {
t.Errorf("got %v, wanted %v", h, wantHash)
}

msgTx = &wire.MsgTx{}
err = msgTx.Deserialize(bytes.NewReader(tx73be398c4))
if err != nil {
t.Fatal(err)
}
wantHash = "73be398c4bdc43709db7398106609eea2a7841aaf3a4fa2000dc18184faa2a7e"
if h := msgTx.TxHash().String(); h != wantHash {
t.Errorf("got %v, wanted %v", h, wantHash)
}
}
2 changes: 1 addition & 1 deletion client/cmd/dexc/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
// and build metadata portions MUST only contain characters from
// semanticAlphabet.
// NOTE: The Version string is overridden on init.
Version = "0.5.4+release.local"
Version = "0.5.5+release.local"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion client/cmd/dexcctl/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
// and build metadata portions MUST only contain characters from
// semanticAlphabet.
// NOTE: The Version string is overridden on init.
Version = "0.5.4+release.local"
Version = "0.5.5+release.local"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion dex/testing/loadbot/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/aead/siphash v1.0.1 // indirect
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
github.com/btcsuite/btcd v0.23.2 // indirect
github.com/btcsuite/btcd v0.23.3 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect
github.com/btcsuite/btcd/btcutil v1.1.2 // indirect
github.com/btcsuite/btcd/btcutil/psbt v1.1.5 // indirect
Expand Down
4 changes: 2 additions & 2 deletions dex/testing/loadbot/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ github.com/btcsuite/btcd v0.22.0-beta.0.20220207191057-4dc4ff7963b4/go.mod h1:7a
github.com/btcsuite/btcd v0.22.0-beta.0.20220316175102-8d5c75c28923/go.mod h1:taIcYprAW2g6Z9S0gGUxyR+zDwimyDMK5ePOX+iJ2ds=
github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.2 h1:/YOgUp25sdCnP5ho6Hl3s0E438zlX+Kak7E6TgBgoT0=
github.com/btcsuite/btcd v0.23.2/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.3 h1:4KH/JKy9WiCd+iUS9Mu0Zp7Dnj17TGdKrg9xc/FGj24=
github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA=
github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
decred.org/dcrwallet/v2 v2.0.8
github.com/btcsuite/btcd v0.23.2
github.com/btcsuite/btcd v0.23.3
github.com/btcsuite/btcd/btcec/v2 v2.2.1
github.com/btcsuite/btcd/btcutil v1.1.2
github.com/btcsuite/btcd/btcutil/psbt v1.1.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ github.com/btcsuite/btcd v0.22.0-beta.0.20220207191057-4dc4ff7963b4/go.mod h1:7a
github.com/btcsuite/btcd v0.22.0-beta.0.20220316175102-8d5c75c28923/go.mod h1:taIcYprAW2g6Z9S0gGUxyR+zDwimyDMK5ePOX+iJ2ds=
github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.2 h1:/YOgUp25sdCnP5ho6Hl3s0E438zlX+Kak7E6TgBgoT0=
github.com/btcsuite/btcd v0.23.2/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.3 h1:4KH/JKy9WiCd+iUS9Mu0Zp7Dnj17TGdKrg9xc/FGj24=
github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA=
github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
Expand Down
2 changes: 1 addition & 1 deletion pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

VER="0.5.4"
VER="0.5.5"

rm -rf bin
mkdir -p bin/dexc-windows-amd64-v${VER}
Expand Down
2 changes: 1 addition & 1 deletion server/cmd/dcrdex/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
// and build metadata portions MUST only contain characters from
// semanticAlphabet.
// NOTE: The Version string is overridden on init.
Version = "0.5.4+release.local"
Version = "0.5.5+release.local"
)

func init() {
Expand Down