Skip to content

Commit 3909738

Browse files
authored
xmr: Add Linux ARM64 (aarch64) library support. (#3567)
* xmr: Add Linux ARM64 (aarch64) library support. Add cross-compilation toolchain and build step for aarch64-linux-gnu to the Dockerfile, cgo linker flags for linux/arm64, and the lib/linux-arm64/ directory. * eth: Downgrade bridge init failure logs to Warn. Bridge initialization is expected to fail on simnet since Across and Polygon bridges only support mainnet and testnet. * politeia: Downgrade routine sync logs to Debug. * docs: Update v1.1.0 release notes. Fix Go version (1.24 not 1.25), add Go 1.24 requirement to upgrade notes, update commit/contributor counts, add one-time contributors row.
1 parent 207f08e commit 3909738

File tree

9 files changed

+44
-17
lines changed

9 files changed

+44
-17
lines changed

client/asset/eth/eth.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,26 +2028,26 @@ func (w *ETHWallet) Connect(ctx context.Context) (_ *sync.WaitGroup, err error)
20282028

20292029
w.bridges = make(map[string]bridge)
20302030
if acrossBridge, err := newAcrossBridge(ctx, w.node.contractBackend(), w.node, w.assetID, w.net, w.addr, w.log); err != nil {
2031-
w.log.Errorf("Failed to initialize Across bridge: %v", err)
2031+
w.log.Warnf("Failed to initialize Across bridge: %v", err)
20322032
} else {
20332033
w.bridges[acrossBridgeName] = acrossBridge
20342034
}
20352035

20362036
/* if usdcBridge, err := newUsdcBridge(w.assetID, w.net, w.node.contractBackend(), w.addr, w.node); err != nil {
2037-
w.log.Errorf("Failed to initialize USDC bridge: %v", err)
2037+
w.log.Warnf("Failed to initialize USDC bridge: %v", err)
20382038
} else {
20392039
w.bridges[usdcBridgeName] = usdcBridge
20402040
} */
20412041

20422042
if w.assetID == ethID {
20432043
if polygonBridge, err := newPolygonBridgeEth(ctx, w.node.contractBackend(), w.net, w.addr, w.node, w.log); err != nil {
2044-
w.log.Errorf("Failed to initialize Polygon bridge for ETH: %v", err)
2044+
w.log.Warnf("Failed to initialize Polygon bridge for ETH: %v", err)
20452045
} else {
20462046
w.bridges[polygonBridgeName] = polygonBridge
20472047
}
20482048
} else if w.assetID == polygonID {
20492049
if polygonBridge, err := newPolygonBridgePolygon(w.node.contractBackend(), w.net, w.log); err != nil {
2050-
w.log.Errorf("Failed to initialize Polygon bridge for Polygon: %v", err)
2050+
w.log.Warnf("Failed to initialize Polygon bridge for Polygon: %v", err)
20512051
} else {
20522052
w.bridges[polygonBridgeName] = polygonBridge
20532053
}

client/asset/xmr/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,24 @@ RUN apt-get update && apt-get install -y \
4444
gperf \
4545
xz-utils \
4646
python-is-python3 \
47+
# Linux ARM64 cross-compilation
48+
gcc-aarch64-linux-gnu \
49+
g++-aarch64-linux-gnu \
4750
# Windows cross-compilation (MinGW)
4851
gcc-mingw-w64-x86-64 \
4952
g++-mingw-w64-x86-64 \
5053
&& rm -rf /var/lib/apt/lists/*
5154

52-
# Clone monero_c with submodules
53-
RUN git clone --recursive https://github.com/MrCyjaneK/monero_c.git /monero_c
55+
# Clone monero_c (without --recursive so submodules match the pinned commit)
56+
RUN git clone https://github.com/MrCyjaneK/monero_c.git /monero_c
5457

5558
WORKDIR /monero_c
5659

57-
# Checkout specific version and apply patches
60+
# Checkout specific version, sync submodules, and apply patches
5861
RUN git config --global user.name "bob" && \
5962
git config --global user.email "bob@nowhere.com" && \
6063
git checkout 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 && \
64+
git submodule update --init --recursive && \
6165
./apply_patches.sh monero
6266

6367
# Apply our custom patches for allow_mismatched_daemon_version
@@ -73,6 +77,9 @@ RUN sed -i '/_MONERO_Wallet_setTrustedDaemon/a _MONERO_Wallet_setAllowMismatched
7377
# Build for Linux x86_64
7478
RUN ./build_single.sh monero x86_64-linux-gnu -j$(nproc)
7579

80+
# Build for Linux ARM64
81+
RUN ./build_single.sh monero aarch64-linux-gnu -j$(nproc)
82+
7683
# Switch mingw-w64 to use POSIX threading model (required for std::mutex in Boost 1.85+)
7784
RUN update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix && \
7885
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix

client/asset/xmr/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ The shared library must also be available at runtime.
2626
**Option 1: Copy next to executable (recommended for development)**
2727

2828
```bash
29-
# Linux
29+
# Linux x86_64
3030
cp client/asset/xmr/lib/linux-amd64/libwallet2_api_c.so ./
3131

32+
# Linux ARM64
33+
cp client/asset/xmr/lib/linux-arm64/libwallet2_api_c.so ./
34+
3235
# macOS ARM64 (Apple Silicon)
3336
cp client/asset/xmr/lib/darwin-arm64/libwallet2_api_c.dylib ./
3437
codesign -s - bisonw
@@ -125,6 +128,7 @@ client/asset/xmr/
125128
│ └── doc.go # Package documentation
126129
└── lib/
127130
├── linux-amd64/ # Linux x86_64 library
131+
├── linux-arm64/ # Linux ARM64 library
128132
├── darwin-amd64/ # macOS x86_64 library
129133
├── darwin-arm64/ # macOS ARM64 library
130134
├── windows-amd64/ # Windows x86_64 library
@@ -298,6 +302,8 @@ docker build -t monero_c_builder .
298302
# Extract libraries to lib/ directories
299303
docker run --rm monero_c_builder cat /monero_c/release/monero/x86_64-linux-gnu_libwallet2_api_c.so.xz | xz -d > lib/linux-amd64/libwallet2_api_c.so
300304

305+
docker run --rm monero_c_builder cat /monero_c/release/monero/aarch64-linux-gnu_libwallet2_api_c.so.xz | xz -d > lib/linux-arm64/libwallet2_api_c.so
306+
301307
docker run --rm monero_c_builder cat /monero_c/release/monero/x86_64-w64-mingw32_libwallet2_api_c.dll.xz | xz -d > lib/windows-amd64/libwallet2_api_c.dll
302308

303309
docker run --rm monero_c_builder cat /monero_c/release/monero/x86_64-apple-darwin11_libwallet2_api_c.dylib.xz | xz -d > lib/darwin-amd64/libwallet2_api_c.dylib
@@ -307,6 +313,7 @@ docker run --rm monero_c_builder cat /monero_c/release/monero/aarch64-apple-darw
307313

308314
**Supported targets:**
309315
- Linux x86_64 (`x86_64-linux-gnu`)
316+
- Linux ARM64 (`aarch64-linux-gnu`)
310317
- Windows x86_64 (`x86_64-w64-mingw32`)
311318
- macOS x86_64 (`x86_64-apple-darwin11`)
312319
- macOS ARM64 (`aarch64-apple-darwin11`)

client/asset/xmr/cxmr/cgo_linux.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
package cxmr
77

88
// On Linux, the libwallet2_api_c.so library is included in
9-
// client/asset/xmr/lib/linux-amd64/ and linked automatically via cgo
10-
// LDFLAGS in wallet.go.
9+
// client/asset/xmr/lib/linux-amd64/ (x86_64) or linux-arm64/ (aarch64)
10+
// and linked automatically via cgo LDFLAGS in wallet.go.
1111
//
1212
// At runtime, the library is searched for in the following order:
1313
// 1. Same directory as the executable ($ORIGIN)
1414
// 2. /usr/lib/bisonw/
1515
//
1616
// For development, copy the library next to the executable:
1717
//
18-
// cp client/asset/xmr/lib/linux-amd64/libwallet2_api_c.so ./
18+
// cp client/asset/xmr/lib/linux-amd64/libwallet2_api_c.so ./ # x86_64
19+
// cp client/asset/xmr/lib/linux-arm64/libwallet2_api_c.so ./ # aarch64
1920
//
2021
// For system packaging, install to the application library directory:
2122
//

client/asset/xmr/cxmr/wallet.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package cxmr
1010
/*
1111
#cgo LDFLAGS: -lwallet2_api_c
1212
#cgo linux,amd64 LDFLAGS: -L${SRCDIR}/../lib/linux-amd64 -Wl,-rpath,$ORIGIN -Wl,-rpath,/usr/lib/bisonw
13+
#cgo linux,arm64 LDFLAGS: -L${SRCDIR}/../lib/linux-arm64 -Wl,-rpath,$ORIGIN -Wl,-rpath,/usr/lib/bisonw
1314
#cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/../lib/darwin-amd64
1415
#cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/../lib/darwin-arm64
1516
#cgo windows,amd64 LDFLAGS: -L${SRCDIR}/../lib/windows-amd64

client/asset/xmr/lib/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Libraries must be built using the Dockerfile in the parent directory (see below)
88
| Directory | Platform | Library |
99
|-----------|----------|---------|
1010
| `linux-amd64/` | Linux x86_64 | `libwallet2_api_c.so` |
11+
| `linux-arm64/` | Linux ARM64 | `libwallet2_api_c.so` |
1112
| `windows-amd64/` | Windows x86_64 | `libwallet2_api_c.dll` |
1213
| `darwin-amd64/` | macOS x86_64 | `libwallet2_api_c.dylib` |
1314
| `darwin-arm64/` | macOS ARM64 | `libwallet2_api_c.dylib` |
@@ -23,6 +24,8 @@ docker build -t monero_c_builder .
2324
# Extract libraries
2425
docker run --rm monero_c_builder cat /monero_c/release/monero/x86_64-linux-gnu_libwallet2_api_c.so.xz | xz -d > lib/linux-amd64/libwallet2_api_c.so
2526

27+
docker run --rm monero_c_builder cat /monero_c/release/monero/aarch64-linux-gnu_libwallet2_api_c.so.xz | xz -d > lib/linux-arm64/libwallet2_api_c.so
28+
2629
docker run --rm monero_c_builder cat /monero_c/release/monero/x86_64-w64-mingw32_libwallet2_api_c.dll.xz | xz -d > lib/windows-amd64/libwallet2_api_c.dll
2730

2831
docker run --rm monero_c_builder cat /monero_c/release/monero/x86_64-apple-darwin11_libwallet2_api_c.dylib.xz | xz -d > lib/darwin-amd64/libwallet2_api_c.dylib
@@ -36,9 +39,12 @@ After building bisonw with XMR support, the library must be available at runtime
3639

3740
**Option 1: Copy library next to executable (recommended for development)**
3841
```bash
39-
# Linux
42+
# Linux x86_64
4043
cp lib/linux-amd64/libwallet2_api_c.so ./
4144

45+
# Linux ARM64
46+
cp lib/linux-arm64/libwallet2_api_c.so ./
47+
4248
# macOS
4349
cp lib/darwin-arm64/libwallet2_api_c.dylib ./ # or darwin-amd64
4450

client/asset/xmr/lib/linux-arm64/.gitkeep

Whitespace-only changes.

dex/politeia/proposals.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (p *Politeia) ProposalsSync() error {
7171
// Save the timestamp of the last update check only on success.
7272
p.lastSync.Store(time.Now().UTC().Unix())
7373

74-
p.log.Info("Politeia records were synced.")
74+
p.log.Debug("Politeia records were synced.")
7575

7676
return nil
7777
}
@@ -412,7 +412,7 @@ func (p *Politeia) proposalsNewUpdate() error {
412412
}
413413

414414
nProposals := len(proposals)
415-
p.log.Infof("Loaded %d proposal records from db...", nProposals)
415+
p.log.Debugf("Loaded %d proposal records from db...", nProposals)
416416

417417
// Create proposals map from local db proposals.
418418
proposalsMap := make(map[string]struct{})
@@ -518,7 +518,7 @@ func (p *Politeia) proposalsInProgressUpdate() error {
518518
}
519519
}
520520

521-
p.log.Infof("Fetching data for %d in-progress proposals...", len(propsInProgress))
521+
p.log.Debugf("Fetching data for %d in-progress proposals...", len(propsInProgress))
522522

523523
for _, prop := range propsInProgress {
524524
if err := p.ctx.Err(); err != nil {

docs/release-notes/release-notes-1.1.0.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Bison Wallet v1.1.0
22

3-
This is a major feature release with 397 commits from 18+ contributors. It
3+
This is a major feature release with 400+ commits from 60+ contributors. It
44
introduces Monero support, cross-chain bridging, private atomic swaps, gasless
55
EVM redemptions, Politeia governance integration, and significantly expanded
66
market making capabilities. All users must update. The protocol is incompatible
77
between versions.
88

99
## Important Upgrade Notes
1010

11+
### Go 1.24 Required
12+
13+
The minimum Go version for building from source is now Go 1.24.
14+
1115
### Protocol Incompatibility
1216

1317
This release introduces per-match swap addresses, which change the trade
@@ -195,7 +199,7 @@ operators should either:
195199

196200
### Build and CI
197201

198-
- Go 1.25 and updated GitHub actions (#3347)
202+
- Go 1.24 and updated GitHub actions (#3347)
199203
- Docker base images updated (#3341)
200204
- Add more platforms for binary builds (#3073)
201205
- Implement snap package (#2580)
@@ -241,3 +245,4 @@ operators should either:
241245
| slightsharp | 2 |
242246
| Dave Collins | 1 |
243247
| Jared Tate | 1 |
248+
| Other one-time contributors | ~45 |

0 commit comments

Comments
 (0)