Skip to content

Commit 7fa27f9

Browse files
authored
multi: Update go deps. (#3559)
* lexi: Fix path truncation in NeedsV1toV4Update. path[:len(version4Suffix)] truncates to 3 characters instead of stripping the suffix. Use path[:lenDiff] to get the correct base path. * eth: Fall back to normal redeem when relay fails. When GaslessRedeem fails to submit via the relay service, re-check whether the wallet has sufficient funds for a regular gas-paying redemption before giving up. This handles the case where a pending transaction confirmed between the initial balance check and the relay attempt, and avoids a single point of failure on the relay server. * server: Document EVM contract version upgrade procedure. The server's ETH RPC client binds to a single contract version. When upgrading from v1.0.6 (contract v0) to v1.1.0+ (contract v1), in-flight v0 swaps at TakerSwapCast or later are not revoked but their redeem coins cannot be verified. Operators must either drain active EVM swaps before upgrading or use evm-protocol-overrides.json to keep v0 active until remaining swaps complete. * server: Fix nil market panic on startup revocation. Pre-upgrade matches revoked during restoreActiveSwaps trigger the swapDone callback, but markets are not populated until after the Swapper is created. Guard against nil market in the callback. * deps: Update module dependencies. Update direct dependencies to latest compatible versions including go-ethereum v1.17.1, bbolt v1.4.3, chi v5.2.5, badger v4.9.1, and others. The btcec/v2 and agl/ed25519 upgrades were skipped due to breaking API changes. The golang.org/x/ packages were kept at their current versions as the latest releases require Go 1.25. * client/core: Fix data race in TestTradeTracking. Move swapReceipts and queueResponse writes before setConfs to avoid racing with the afterAudit tick goroutine. The afterAudit callback spawns tick goroutines that read swapReceipts as soon as confirmations are met. The confsMtx in setConfs/tConfirmations provides the happens-before ordering.
1 parent 8c71e8f commit 7fa27f9

File tree

14 files changed

+366
-295
lines changed

14 files changed

+366
-295
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ jobs:
6565
steps:
6666
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
6767
- uses: DavidAnson/markdownlint-cli2-action@30a0e04f1870d58f8d717450cc6134995f993c63 #v21.0.0
68-
continue-on-error: true
6968
with:
7069
globs: |
7170
*.md

client/asset/eth/eth.go

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4411,10 +4411,27 @@ func (w *ETHWallet) GaslessRedeem(ctx context.Context, form *asset.RedeemForm) (
44114411
relay := w.relayer
44124412
w.relayerMtx.RUnlock()
44134413
if relay == nil {
4414-
return fail(fmt.Errorf("relayer not configured"))
4415-
}
4416-
txs, coin, fees, err := w.gaslessRedeem(ctx, form, relay)
4417-
return txs, coin, fees, false, err
4414+
return fail(fmt.Errorf("relayer not configured and insufficient funds for gas"))
4415+
}
4416+
txs, coin, fees, relayErr := w.gaslessRedeem(ctx, form, relay)
4417+
if relayErr == nil {
4418+
return txs, coin, fees, false, nil
4419+
}
4420+
// Relay failed. Try a normal redemption in case funds have
4421+
// become available since the initial check (e.g. a pending
4422+
// tx confirmed).
4423+
w.log.Warnf("Gasless relay redeem failed (%v), attempting normal redemption as fallback.", relayErr)
4424+
if lockErr := w.lockFunds(reserve, redemptionReserve); lockErr != nil {
4425+
// Still can't afford gas. Return the original relay error
4426+
// since that's the primary failure.
4427+
return fail(fmt.Errorf("relay failed: %v; fallback failed: %w", relayErr, lockErr))
4428+
}
4429+
defer w.unlockFunds(reserve, redemptionReserve)
4430+
txs, coin, fees, redeemErr := w.assetWallet.Redeem(ctx, form, nil, nil)
4431+
if redeemErr != nil {
4432+
return fail(fmt.Errorf("relay failed: %v; fallback redeem failed: %w", relayErr, redeemErr))
4433+
}
4434+
return txs, coin, fees, true, nil
44184435
}
44194436
if err != nil {
44204437
return fail(err)

client/cmd/bisonw-desktop/go.mod

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ require (
88
decred.org/dcrdex v0.6.3
99
fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6
1010
github.com/bisoncraft/webview_go v0.1.0
11-
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
11+
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
1212
)
1313

1414
require (
1515
decred.org/dcrwallet v1.7.0 // indirect
16-
filippo.io/edwards25519 v1.0.0 // indirect
16+
filippo.io/edwards25519 v1.2.0 // indirect
1717
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
1818
github.com/BurntSushi/toml v1.4.0 // indirect
1919
github.com/Microsoft/go-winio v0.6.2 // indirect
@@ -25,7 +25,7 @@ require (
2525
github.com/bisoncraft/op-geth v0.0.0-20250729074358-3cfe4f15e91c // indirect
2626
github.com/bits-and-blooms/bitset v1.22.0 // indirect
2727
github.com/cespare/xxhash v1.1.0 // indirect
28-
github.com/consensys/gnark-crypto v0.18.0 // indirect
28+
github.com/consensys/gnark-crypto v0.18.1 // indirect
2929
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
3030
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
3131
github.com/dcrlabs/ltcwallet v0.0.0-20240823165752-3e026e8da010 // indirect
@@ -44,11 +44,11 @@ require (
4444
github.com/decred/vspd/client/v4 v4.0.2 // indirect
4545
github.com/decred/vspd/types/v3 v3.0.0 // indirect
4646
github.com/dgraph-io/badger v1.6.2 // indirect
47-
github.com/dgraph-io/badger/v4 v4.9.0 // indirect
47+
github.com/dgraph-io/badger/v4 v4.9.1 // indirect
4848
github.com/dgraph-io/ristretto v0.0.2 // indirect
4949
github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect
5050
github.com/emicklei/dot v1.6.2 // indirect
51-
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
51+
github.com/ethereum/c-kzg-4844/v2 v2.1.6 // indirect
5252
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
5353
github.com/ethereum/go-verkle v0.2.2 // indirect
5454
github.com/ferranbt/fastssz v0.1.4 // indirect
@@ -73,14 +73,14 @@ require (
7373
github.com/pkg/errors v0.9.1 // indirect
7474
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7575
github.com/stretchr/objx v0.5.2 // indirect
76-
github.com/stretchr/testify v1.10.0 // indirect
77-
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
76+
github.com/stretchr/testify v1.11.1 // indirect
77+
github.com/supranational/blst v0.3.16 // indirect
7878
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect
79-
github.com/yuin/goldmark v1.7.13 // indirect
80-
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
81-
go.opentelemetry.io/otel v1.37.0 // indirect
82-
go.opentelemetry.io/otel/metric v1.37.0 // indirect
83-
go.opentelemetry.io/otel/trace v1.37.0 // indirect
79+
github.com/yuin/goldmark v1.7.16 // indirect
80+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
81+
go.opentelemetry.io/otel v1.39.0 // indirect
82+
go.opentelemetry.io/otel/metric v1.39.0 // indirect
83+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
8484
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
8585
gopkg.in/yaml.v2 v2.4.0 // indirect
8686
gopkg.in/yaml.v3 v3.0.1 // indirect
@@ -100,7 +100,7 @@ require (
100100
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
101101
github.com/btcsuite/btcd/btcutil/psbt v1.1.8 // indirect
102102
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
103-
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect
103+
github.com/btcsuite/btclog v1.0.0 // indirect
104104
github.com/btcsuite/btcwallet v0.16.10 // indirect
105105
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 // indirect
106106
github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 // indirect
@@ -122,13 +122,13 @@ require (
122122
github.com/decred/dcrd/certgen v1.2.0 // indirect
123123
github.com/decred/dcrd/chaincfg/chainhash v1.0.5 // indirect
124124
github.com/decred/dcrd/chaincfg/v3 v3.3.0 // indirect
125-
github.com/decred/dcrd/connmgr/v3 v3.1.3 // indirect
125+
github.com/decred/dcrd/connmgr/v3 v3.1.4 // indirect
126126
github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect
127127
github.com/decred/dcrd/crypto/ripemd160 v1.0.2 // indirect
128128
github.com/decred/dcrd/database/v3 v3.0.3 // indirect
129129
github.com/decred/dcrd/dcrec v1.0.1 // indirect
130130
github.com/decred/dcrd/dcrec/edwards/v2 v2.0.4 // indirect
131-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
131+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect
132132
github.com/decred/dcrd/dcrjson/v4 v4.2.0 // indirect
133133
github.com/decred/dcrd/dcrutil/v4 v4.0.3 // indirect
134134
github.com/decred/dcrd/gcs/v4 v4.1.1 // indirect
@@ -137,34 +137,34 @@ require (
137137
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.4.0 // indirect
138138
github.com/decred/dcrd/rpcclient/v8 v8.1.0 // indirect
139139
github.com/decred/dcrd/txscript/v4 v4.1.2 // indirect
140-
github.com/decred/dcrd/wire v1.7.2 // indirect
140+
github.com/decred/dcrd/wire v1.7.4 // indirect
141141
github.com/decred/go-socks v1.1.0 // indirect
142142
github.com/decred/slog v1.2.0 // indirect
143143
github.com/decred/vspd/types/v2 v2.1.0 // indirect
144144
github.com/dustin/go-humanize v1.0.1 // indirect
145-
github.com/ethereum/go-ethereum v1.16.7 // indirect
145+
github.com/ethereum/go-ethereum v1.17.1 // indirect
146146
github.com/fsnotify/fsnotify v1.6.0 // indirect
147147
github.com/gcash/bchd v0.19.0 // indirect
148148
github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6 // indirect
149149
github.com/gcash/bchutil v0.0.0-20210113190856-6ea28dff4000 // indirect
150150
github.com/gen2brain/beeep v0.0.0-20240112042604-c7bb2cd88fea
151-
github.com/go-chi/chi/v5 v5.0.1 // indirect
151+
github.com/go-chi/chi/v5 v5.2.5 // indirect
152152
github.com/go-ole/go-ole v1.3.0 // indirect
153153
github.com/godbus/dbus/v5 v5.1.0 // indirect
154154
github.com/gofrs/flock v0.12.1 // indirect
155155
github.com/golang/snappy v1.0.0 // indirect
156156
github.com/google/uuid v1.6.0 // indirect
157-
github.com/gorilla/websocket v1.5.1 // indirect
157+
github.com/gorilla/websocket v1.5.3 // indirect
158158
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
159159
github.com/holiman/uint256 v1.3.2 // indirect
160-
github.com/huandu/skiplist v1.2.0 // indirect
161-
github.com/jessevdk/go-flags v1.5.0 // indirect
160+
github.com/huandu/skiplist v1.2.1 // indirect
161+
github.com/jessevdk/go-flags v1.6.1 // indirect
162162
github.com/jrick/bitset v1.0.0 // indirect
163-
github.com/jrick/logrotate v1.0.0 // indirect
163+
github.com/jrick/logrotate v1.1.2 // indirect
164164
github.com/jrick/wsrpc/v2 v2.3.8 // indirect
165165
github.com/kkdai/bstream v1.0.0 // indirect
166166
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
167-
github.com/lib/pq v1.10.4 // indirect
167+
github.com/lib/pq v1.11.2 // indirect
168168
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
169169
github.com/lightninglabs/neutrino v0.16.1-0.20240814152458-81d6cd2d2da5 // indirect
170170
github.com/lightninglabs/neutrino/cache v1.1.2 // indirect
@@ -179,16 +179,13 @@ require (
179179
github.com/ltcsuite/ltcd/btcec/v2 v2.3.2 // indirect
180180
github.com/ltcsuite/ltcd/ltcutil v1.1.4-0.20240131072528-64dfa402637a // indirect
181181
github.com/ltcsuite/ltcd/ltcutil/psbt v1.1.1-0.20240131072528-64dfa402637a // indirect
182-
github.com/mattn/go-runewidth v0.0.16 // indirect
183-
github.com/olekukonko/tablewriter v0.0.5 // indirect
184-
github.com/rivo/uniseg v0.4.7 // indirect
185182
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
186183
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
187184
github.com/tevino/abool v1.2.0 // indirect
188185
github.com/tklauser/go-sysconf v0.3.12 // indirect
189186
github.com/tklauser/numcpus v0.6.1 // indirect
190187
github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 // indirect
191-
go.etcd.io/bbolt v1.3.12 // indirect
188+
go.etcd.io/bbolt v1.4.3 // indirect
192189
golang.org/x/crypto v0.47.0 // indirect
193190
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
194191
golang.org/x/net v0.48.0 // indirect
@@ -197,7 +194,7 @@ require (
197194
golang.org/x/term v0.39.0 // indirect
198195
golang.org/x/text v0.33.0 // indirect
199196
golang.org/x/time v0.9.0 // indirect
200-
google.golang.org/protobuf v1.36.10 // indirect
201-
gopkg.in/ini.v1 v1.67.0 // indirect
202-
lukechampine.com/blake3 v1.3.0 // indirect
197+
google.golang.org/protobuf v1.36.11 // indirect
198+
gopkg.in/ini.v1 v1.67.1 // indirect
199+
lukechampine.com/blake3 v1.4.1 // indirect
203200
)

0 commit comments

Comments
 (0)