Skip to content

Commit

Permalink
backend: update to v4.37.1 (hotfix)
Browse files Browse the repository at this point in the history
Some users reported the app crashing when Litecoin is enabled with the
the following error:

> panic: readScript: script witness item is larger than the max allowed size [count 65973, max 11000]

The limit in question was fixed by btcd a while ago, so we simply
update btcd.

It is unusual to have such large witness sizes, so there is a chance
something else is going wrong that casuses the transaction to not
deserialize correctly.
  • Loading branch information
benma committed Jun 19, 2023
1 parent 4e5763c commit c4abfa7
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 33 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 4.37.1
- Fix BitBoxApp crash when processing BTC/LTC transactions containing too large witness items

## 4.37.0
- Bundle BitBox02 firmware version v9.14.0
- Enable auto HiDPI scaling to correctly manage scale factor on high density screens
Expand Down
2 changes: 1 addition & 1 deletion backend/keystore/software/software.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (keystore *Keystore) SignTransaction(
}

if address.Configuration.ScriptType() == signing.ScriptTypeP2TR {
prv = txscript.TweakTaprootPrivKey(prv, nil)
prv = txscript.TweakTaprootPrivKey(*prv, nil)
signatureHash, err := txscript.CalcTaprootSignatureHash(
btcProposedTx.SigHashes, txscript.SigHashDefault, transaction,
index, btcProposedTx.PreviousOutputs)
Expand Down
2 changes: 1 addition & 1 deletion backend/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const updateFileURL = "https://shiftcrypto.ch/updates/desktop.json"

var (
// Version of the backend as displayed to the user.
Version = semver.NewSemVer(4, 37, 0)
Version = semver.NewSemVer(4, 37, 1)
)

// UpdateFile is retrieved from the server.
Expand Down
4 changes: 2 additions & 2 deletions frontends/android/BitBoxApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "ch.shiftcrypto.bitboxapp"
minSdkVersion 21
targetSdkVersion 31
versionCode 42
versionName "android-4.37.0"
versionCode 43
versionName "android-4.37.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions frontends/qt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ linux:
cp resources/linux/usr/share/icons/hicolor/128x128/apps/bitbox.png build/linux-tmp
mkdir build/tmp-deb/opt/
cp -aR build/linux-tmp build/tmp-deb/opt/bitbox
cd build/linux && fpm --after-install ../../resources/deb-afterinstall.sh -s dir -t deb -n bitbox -v 4.37.0 -C ../tmp-deb/
cd build/linux && fpm --after-install ../../resources/deb-afterinstall.sh -s dir -t rpm -n bitbox -v 4.37.0 -C ../tmp-deb/
cd build/linux && fpm --after-install ../../resources/deb-afterinstall.sh -s dir -t deb -n bitbox -v 4.37.1 -C ../tmp-deb/
cd build/linux && fpm --after-install ../../resources/deb-afterinstall.sh -s dir -t rpm -n bitbox -v 4.37.1 -C ../tmp-deb/
# create AppImage
cd build/linux-tmp && /opt/linuxdeployqt-7-x86_64.AppImage BitBox -appimage -unsupported-allow-new-glibc
mv build/linux-tmp/BitBoxApp-*-x86_64.AppImage build/linux/
Expand Down
4 changes: 2 additions & 2 deletions frontends/qt/resources/MacOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<string>APPL</string>

<key>CFBundleVersion</key>
<string>4.37.0</string>
<string>4.37.1</string>

<key>CFBundleShortVersionString</key>
<string>4.37.0</string>
<string>4.37.1</string>

<key>CFBundleSignature</key>
<string>????</string>
Expand Down
2 changes: 1 addition & 1 deletion frontends/qt/setup.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SetCompressor /SOLID lzma

# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
!define VERSION 4.37.0.0
!define VERSION 4.37.1.0
!define COMPANY "Shift Crypto AG"
!define URL https://github.com/digitalbitbox/bitbox-wallet-app/releases/
!define BINDIR "build\windows"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/digitalbitbox/bitbox-wallet-app
go 1.19

require (
github.com/btcsuite/btcd v0.23.1
github.com/btcsuite/btcd v0.23.4
github.com/btcsuite/btcd/btcec/v2 v2.2.1
github.com/btcsuite/btcd/btcutil v1.1.2
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M=
github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.1 h1:IB8cVQcC2X5mHbnfirLG5IZnkWYNTPlLZVrxUYSotbE=
github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.4 h1:IzV6qqkfwbItOS/sg/aDfPDsjPP8twrCOE2R93hxMlQ=
github.com/btcsuite/btcd v0.23.4/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.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E=
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/btcsuite/btcd/blockchain/weight.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/btcsuite/btcd/txscript/sign.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/btcsuite/btcd/txscript/taproot.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 21 additions & 17 deletions vendor/github.com/btcsuite/btcd/wire/msgtx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ github.com/StackExchange/wmi
# github.com/aead/siphash v1.0.1
## explicit
github.com/aead/siphash
# github.com/btcsuite/btcd v0.23.1
# github.com/btcsuite/btcd v0.23.4
## explicit; go 1.17
github.com/btcsuite/btcd/blockchain
github.com/btcsuite/btcd/blockchain/indexers
Expand Down Expand Up @@ -35,6 +35,12 @@ github.com/btcsuite/btcd/chaincfg/chainhash
# github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
## explicit
github.com/btcsuite/btclog
# github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd
## explicit
# github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792
## explicit
# github.com/btcsuite/winsvc v1.0.0
## explicit
# github.com/cespare/cp v1.1.1
## explicit
# github.com/davecgh/go-spew v1.1.1
Expand All @@ -51,6 +57,8 @@ github.com/decred/dcrd/crypto/blake256
github.com/decred/dcrd/dcrec/secp256k1/v4
github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa
github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr
# github.com/decred/dcrd/lru v1.0.0
## explicit; go 1.11
# github.com/digitalbitbox/bitbox02-api-go v0.0.0-20230403145434-d71ecec2b7ad
## explicit; go 1.13
github.com/digitalbitbox/bitbox02-api-go/api/bootloader
Expand Down Expand Up @@ -115,6 +123,8 @@ github.com/go-ole/go-ole/oleutil
# github.com/go-stack/stack v1.8.0
## explicit
github.com/go-stack/stack
# github.com/golang/snappy v0.0.4
## explicit
# github.com/google/uuid v1.2.0
## explicit
github.com/google/uuid
Expand All @@ -124,6 +134,10 @@ github.com/gorilla/mux
# github.com/gorilla/websocket v1.4.2
## explicit; go 1.12
github.com/gorilla/websocket
# github.com/jessevdk/go-flags v1.4.0
## explicit
# github.com/jrick/logrotate v1.0.0
## explicit
# github.com/kkdai/bstream v1.0.0
## explicit; go 1.6
github.com/kkdai/bstream
Expand Down Expand Up @@ -162,6 +176,8 @@ github.com/stretchr/testify/assert
github.com/stretchr/testify/mock
github.com/stretchr/testify/require
github.com/stretchr/testify/suite
# github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
## explicit; go 1.14
# github.com/tklauser/go-sysconf v0.3.5
## explicit; go 1.13
github.com/tklauser/go-sysconf
Expand Down

0 comments on commit c4abfa7

Please sign in to comment.