Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
563 commits
Select commit Hold shift + click to select a range
cd5a92e
Sync from private repository
benwgold Sep 22, 2025
7f1a212
Sync from private repository
changli2023 Sep 22, 2025
f23b6d7
Sync from private repository
zhenlu Sep 22, 2025
4336c27
Handle internal leaf state during leaf swaps
carsonp6 Sep 22, 2025
99e7849
Sync from private repository
zhenlu Sep 22, 2025
c7fe7f1
Sync from private repository
mhrheaume Sep 22, 2025
537fe51
Sync from private repository
mhrheaume Sep 22, 2025
95d430d
Sync from private repository
keenan-lightspark Sep 23, 2025
9991a94
Sync from private repository
zhenlu Sep 23, 2025
2f7819e
Sync from private repository
mhrheaume Sep 23, 2025
5f60745
Sync from private repository
santidmar Sep 23, 2025
50cd044
Remove duplicate appending of leaves
carsonp6 Sep 23, 2025
660fb10
Sync from private repository
mhrheaume Sep 23, 2025
c67e446
Sync from private repository
keenan-lightspark Sep 23, 2025
f9384a5
Sync from private repository
mhrheaume Sep 22, 2025
a3237c8
Sync from private repository
mhrheaume Sep 23, 2025
c405cf7
replacement of lossy comparison for sorting token outputs
peterrojs Sep 23, 2025
4ddf0b0
Sync from private repository
keenan-lightspark Sep 23, 2025
eac3cb4
Sync from private repository
mhrheaume Sep 22, 2025
34965f8
Sync from private repository
yellowred Sep 22, 2025
5811adf
Sync from private repository
mhrheaume Sep 22, 2025
1564905
Sync from private repository
mhrheaume Sep 23, 2025
f4c898c
Sync from private repository
santidmar Sep 24, 2025
1deabaa
Sync from private repository
santidmar Sep 24, 2025
cdc938f
Sync from private repository
mhrheaume Sep 23, 2025
37732ef
Sync from private repository
mhrheaume Sep 22, 2025
e349dfd
Sync from private repository
mhrheaume Sep 24, 2025
f6f4275
Sync from private repository
santidmar Sep 24, 2025
7b427b5
Make static deposit tests more deterministic
lightsparkmax Sep 24, 2025
eb4796a
Send spark transfer ID to SSP in request coop exit
carsonp6 Sep 24, 2025
6a5c21b
Pass spark transfer ID in request lightning send
carsonp6 Sep 24, 2025
b93c3b3
[issuer-sdk] React Native support
coreymartin Sep 25, 2025
0dfaf2c
Sync from private repository
carsonp6 Sep 25, 2025
931bace
[js] Remove unused example app
coreymartin Sep 25, 2025
fb6f45a
[spark-sdk] Default to ReactNativeSparkSigner if not provided
coreymartin Sep 25, 2025
a2d8850
Sync from private repository
yellowred Sep 24, 2025
c4768be
Sync from private repository
santidmar Sep 25, 2025
47f63cd
[js] Version packages
coreymartin Sep 25, 2025
9f5aac9
[spark-react-native-app] Add token creation, spark address,
coreymartin Sep 25, 2025
d9871b9
Sync from private repository
zhenlu Sep 23, 2025
7167055
Sync from private repository
zhenlu Sep 25, 2025
2716975
Sync from private repository
zhenlu Sep 25, 2025
961354d
Sync from private repository
zhenlu Sep 25, 2025
3e9e510
Sync from private repository
mhrheaume Sep 25, 2025
953ebcc
Sync from private repository
zhenlu Sep 25, 2025
7456ff3
Sync from private repository
santidmar Sep 25, 2025
ac4e7b3
Sync from private repository
santidmar Sep 25, 2025
834851e
Update lighting invoice payment to support new refund transactions.
lightsparkmax Sep 25, 2025
134c2f6
Fix flaky static deposit test.
lightsparkmax Sep 25, 2025
895a0eb
Sync from private repository
mhrheaume Sep 24, 2025
6e99151
Sync from private repository
mhrheaume Sep 25, 2025
eb2aceb
Use `sendtoaddress` for funding JS faucet.
mhrheaume Sep 24, 2025
0d4b912
Sync from private repository
yellowred Sep 16, 2025
4dc1cb5
Sync from private repository
akanter Sep 26, 2025
6b75f8c
Sync from private repository
zhenlu Sep 26, 2025
b875039
Sync from private repository
benwgold Sep 26, 2025
637ee18
Sync from private repository
benwgold Sep 26, 2025
01b9646
[spark-sdk, issuer-sdk] Lower target for RN
coreymartin Sep 26, 2025
7a0a48d
Sync from private repository
santidmar Sep 26, 2025
0abe3c9
Sync from private repository
zhenlu Sep 25, 2025
b5822d5
[spark-sdk] Reuse channels across all wallet instances
coreymartin Sep 26, 2025
0429804
Sync from private repository
mhrheaume Sep 27, 2025
e7146ce
Sync from private repository
zhenlu Sep 27, 2025
eb69353
Sync from private repository
zhenlu Sep 28, 2025
8651375
Sync from private repository
mhrheaume Sep 29, 2025
f6cff64
Sync from private repository
mhrheaume Sep 29, 2025
10a2764
[js] Version packages
coreymartin Sep 29, 2025
8b93fdb
Sync from private repository
mhrheaume Sep 29, 2025
7b407ca
Sync from private repository
peterrojs Sep 29, 2025
0964268
Sync from private repository
zhenlu Sep 26, 2025
346ab89
Sync from private repository
zhenlu Sep 26, 2025
7d86d79
Sync from private repository
yellowred Sep 29, 2025
7274960
Sync from private repository
benwgold Sep 29, 2025
6b168f0
Sync from private repository
keenan-lightspark Sep 29, 2025
2c3bf0f
Sync from private repository
mhrheaume Sep 29, 2025
c04a163
Sync from private repository
peterrojs Sep 29, 2025
99de619
Sync from private repository
santidmar Sep 29, 2025
897eb3c
Sync from private repository
akanter Sep 29, 2025
d1b5ba5
Sync from private repository
benwgold Sep 29, 2025
095d318
clean up refund transaction construction
carsonp6 Sep 29, 2025
6903853
clean up node tx construction
carsonp6 Sep 30, 2025
fc4034f
Replace refresh/extend flows with the improved renew leaf flow
carsonp6 Sep 30, 2025
c735c43
Version packages
carsonp6 Sep 30, 2025
f257440
Sync from private repository
zhenlu Sep 30, 2025
8ecc9e2
Sync from private repository
mhrheaume Sep 30, 2025
bfb0524
Sync from private repository
mhrheaume Sep 30, 2025
043b155
Add cpfp unilateral exit integration test.
lightsparkmax Sep 30, 2025
c65eca1
Add test utils to make tests more deterministic.
lightsparkmax Sep 30, 2025
97d1181
Sync from private repository
mhrheaume Sep 29, 2025
ab27be4
Sync from private repository
mhrheaume Sep 30, 2025
68d0529
Create a cli method for creating cpfp transactions.
lightsparkmax Sep 30, 2025
b8e9a55
Sync from private repository
mhrheaume Sep 30, 2025
cdb564c
Sync from private repository
benwgold Sep 30, 2025
fabb8ad
Sync from private repository
zhenlu Sep 30, 2025
af337df
Sync from private repository
benwgold Sep 30, 2025
141ef73
Sync from private repository
benwgold Oct 1, 2025
ed14781
Sync from private repository
zhenlu Oct 1, 2025
abc3e34
Sync from private repository
benwgold Oct 1, 2025
7612288
Sync from private repository
yellowred Sep 30, 2025
80213b4
Sync from private repository
mhrheaume Sep 30, 2025
7661f96
Sync from private repository
brett-ls Oct 1, 2025
575291b
Sync from private repository
peterrojs Oct 1, 2025
fbea92b
Sync from private repository
peterrojs Oct 1, 2025
e5a1766
Sync from private repository
alexjweil Oct 1, 2025
03ed4e8
Sync from private repository
mhrheaume Oct 1, 2025
54602e4
Sync from private repository
alexjweil Oct 1, 2025
72f7727
Sync from private repository
alexjweil Oct 1, 2025
110e296
Sync from private repository
alexjweil Oct 1, 2025
d5836b0
Make leaf optimization strategy configurable
k15z Oct 1, 2025
ca8d4be
Sync from private repository
alexjweil Oct 1, 2025
8369e29
Enable manual leaf optimization management
k15z Oct 1, 2025
0d0ec61
Export taproot signer for react native
carsonp6 Oct 1, 2025
a68e65d
Sync from private repository
zhenlu Sep 26, 2025
a1ac029
Sync from private repository
keenan-lightspark Oct 2, 2025
72c93e4
Sync from private repository
santidmar Oct 2, 2025
f13fc0d
Sync from private repository
yellowred Sep 5, 2025
6a42440
Sync from private repository
santidmar Oct 2, 2025
588990c
Sync from private repository
yellowred Oct 2, 2025
ad59f20
Sync from private repository
zhenlu Oct 2, 2025
ae3ce28
Sync from private repository
mhrheaume Oct 2, 2025
2285843
Sync from private repository
mohamedwane Oct 3, 2025
3c0cc02
Sync from private repository
lightsparkmax Oct 3, 2025
1a4deee
Sync from private repository
benwgold Oct 3, 2025
1eda136
Update bindings to support new 16kb page size requirement for
carsonp6 Oct 3, 2025
e884eb5
Handle binary data in header for xhr-transport
carsonp6 Oct 3, 2025
96f8dff
Sync from private repository
alexjweil Oct 3, 2025
05bb2d3
Sync from private repository
alexjweil Oct 3, 2025
16088f6
Sync from private repository
zhenlu Oct 3, 2025
720512d
Sync from private repository
alexjweil Oct 3, 2025
a982fc0
Sync from private repository
yellowred Oct 3, 2025
18d669f
Sync from private repository
mohamedwane Oct 4, 2025
135fae2
Sync from private repository
yellowred Oct 4, 2025
4876dc6
Sync from private repository
mhrheaume Oct 4, 2025
a5363b6
Sync from private repository
alexjweil Oct 6, 2025
85b4468
Fix JS tests
zhenlu Oct 6, 2025
92010a6
Sync from private repository
zhenlu Oct 6, 2025
a718e8c
Sync from private repository
benwgold Oct 6, 2025
42f9d7d
Sync from private repository
yellowred Sep 24, 2025
551b483
Sync from private repository
yellowred Oct 1, 2025
7ae80a5
Version packages
carsonp6 Oct 6, 2025
0c38cd5
[js] Generate bindings so that new refund tx construction methods are…
mohamedwane Oct 6, 2025
25303f5
Sync from private repository
mhrheaume Oct 7, 2025
c007048
Workaround to fix OTEL instrumentations registration problem
velykodnyi Oct 7, 2025
58cb1ca
Sync from private repository
zhenlu Oct 7, 2025
83f4199
Sync from private repository
peterrojs Oct 7, 2025
9cb8ae3
Sync from private repository
ch-brian Oct 7, 2025
cc6523a
[spark-cli] proper token identifier conversion
peterrojs Oct 7, 2025
c3380a1
Sync from private repository
zhenlu Oct 8, 2025
1085d82
Sync from private repository
mohamedwane Oct 8, 2025
a9f1a30
Sync from private repository
zhenlu Oct 8, 2025
ccd9242
Sync from private repository
lightsparkmax Oct 9, 2025
eed2daf
Sync from private repository
rmalonson Oct 9, 2025
69e0a1c
Sync from private repository
santidmar Oct 9, 2025
7a8d34c
Sync from private repository
santidmar Oct 9, 2025
d39c8ea
Sync from private repository
alexjweil Oct 9, 2025
93f59c3
Sync from private repository
alexjweil Oct 9, 2025
29a1626
Sync from private repository
benwgold Oct 9, 2025
5061cd1
Sync from private repository
mohamedwane Oct 9, 2025
9fab455
Sync from private repository
benwgold Oct 9, 2025
5edb537
Sync from private repository
mhrheaume Oct 9, 2025
ddd7c61
Sync from private repository
akanter Oct 9, 2025
6e03015
Sync from private repository
akanter Oct 9, 2025
c872350
Sync from private repository
ch-brian Oct 9, 2025
42c9e03
Sync from private repository
yunyuyunyu Oct 10, 2025
bc38a86
Sync from private repository
mohamedwane Oct 10, 2025
2266752
Set default optimization mode to 1
k15z Oct 10, 2025
5dd20ee
Sync from private repository
zhenlu Oct 13, 2025
3da97bc
[spark-sdk] consolidation of token outputs
peterrojs Oct 13, 2025
76a43e7
Sync from private repository
santidmar Oct 13, 2025
919f944
Add package export to bare package
carsonp6 Oct 13, 2025
0cc45a2
[spark-sdk] improved output selection strategy
peterrojs Oct 13, 2025
8c93098
[spark-bare-app] Upgrade bare
coreymartin Oct 14, 2025
8d15012
Sync from private repository
benwgold Oct 15, 2025
df6bf11
Sync from private repository
alexjweil Oct 15, 2025
e926273
Sync from private repository
santidmar Oct 15, 2025
d46e31d
Sync from private repository
peterrojs Oct 15, 2025
49314a5
Sync from private repository
peterrojs Oct 15, 2025
802d6f6
[spark-sdk] Add BareHttpTransport to unref sockets for
coreymartin Oct 15, 2025
2a43fbb
Sync from private repository
keenan-lightspark Oct 15, 2025
003289e
Sync from private repository
keenan-lightspark Oct 15, 2025
2f9d33f
[js] Version packages
coreymartin Oct 16, 2025
839c6f7
Sync from private repository
DhruvPareek Oct 16, 2025
1b325d9
Sync from private repository
yellowred Oct 1, 2025
71e72f6
Sync from private repository
keenan-lightspark Oct 16, 2025
af507b9
Sync from private repository
yellowred Sep 24, 2025
3046127
Sync from private repository
yellowred Sep 19, 2025
c5d31fa
Sync from private repository
alexjweil Oct 16, 2025
20048a1
Sync from private repository
yellowred Sep 30, 2025
1133ff6
Sync from private repository
keenan-lightspark Oct 16, 2025
9d23b13
Sync from private repository
keenan-lightspark Oct 16, 2025
6daad53
[issuer-sdk] split spark.test.ts file
peterrojs Oct 16, 2025
7205540
Sync from private repository
santidmar Oct 16, 2025
0a8ee22
Sync from private repository
yellowred Sep 22, 2025
2ef51de
Sync from private repository
yellowred Oct 2, 2025
93f7e0e
Sync from private repository
lightsparkmax Oct 10, 2025
2aa12ba
Sync from private repository
akanter Oct 16, 2025
ed59b11
Sync from private repository
alexjweil Oct 16, 2025
194330c
Sync from private repository
benwgold Oct 17, 2025
ab3e11a
Added scenario CLI which can be used for flexible building
EduardMikhrin Oct 17, 2025
d8639ce
Sync from private repository
mhrheaume Oct 17, 2025
94ead68
Sync from private repository
alexjweil Oct 17, 2025
ca8d5d0
Sync from private repository
alexjweil Oct 17, 2025
476cd37
Sync from private repository
DhruvPareek Oct 17, 2025
6f5fb83
Sync from private repository
ch-brian Oct 17, 2025
3273af4
Sync from private repository
carsonp6 Oct 17, 2025
1d7c41b
re-enable spark invoices
ch-brian Oct 17, 2025
aae2240
Sync from private repository
peterrojs Oct 17, 2025
b38b6e5
return spark1 addresses
ch-brian Oct 18, 2025
769e89e
Sync from private repository
lightsparkmax Oct 18, 2025
c858154
Sync from private repository
mhrheaume Oct 20, 2025
006bcf3
Sync from private repository
yellowred Oct 18, 2025
54e5542
Sync from private repository
peterrojs Oct 20, 2025
d4d9db9
Sync from private repository
DhruvPareek Oct 20, 2025
a5a69d0
Sync from private repository
DhruvPareek Oct 20, 2025
0badb2b
[spark-sdk] Remove unused code from integration tests
coreymartin Oct 20, 2025
8ac47db
Sync from private repository
mohamedwane Oct 20, 2025
954fe26
Sync from private repository
mhrheaume Oct 20, 2025
24fa5b2
Sync from private repository
peterrojs Oct 20, 2025
2dbc639
Sync from private repository
yellowred Oct 20, 2025
ed991f0
Sync from private repository
yellowred Oct 20, 2025
6f79196
Sync from private repository
mohamedwane Oct 21, 2025
84cfaa0
Sync from private repository
mhrheaume Oct 21, 2025
81be7b3
Sync from private repository
lightsparkmax Oct 15, 2025
aad7cfa
[spark-frost-bare-addon] Match rust-toolchain.toml with signer
coreymartin Oct 21, 2025
a3fe34a
Sync from private repository
alexjweil Oct 21, 2025
2998ecf
Sync from private repository
yunyuyunyu Oct 21, 2025
ebea53a
[signer] Fix build-bindings.sh and regen
coreymartin Oct 21, 2025
a2d50f3
Sync from private repository
coreymartin Oct 21, 2025
26e4136
Sync from private repository
yellowred Sep 24, 2025
69bf2a2
Sync from private repository
benwgold Oct 21, 2025
e8556b1
Sync from private repository
peterrojs Oct 21, 2025
9df1ba5
Sync from private repository
yellowred Sep 26, 2025
3afc6ac
Sync from private repository
yellowred Sep 4, 2025
54432f9
[spark-sdk] queryTokenTransactions order addition
peterrojs Oct 22, 2025
03eb068
Sync from private repository
peterrojs Oct 22, 2025
7c0c9f3
[signer] Fix build-bindings.sh and regen
coreymartin Oct 22, 2025
973231b
Sync from private repository
lightsparkmax Oct 20, 2025
a88dc04
Sync from private repository
yellowred Oct 22, 2025
7d46f9b
Deprecate feeQuote param in withdraw in favor of feeAmountSats
carsonp6 Oct 22, 2025
ffc23b5
Sync from private repository
santidmar Oct 22, 2025
de95b28
Sync from private repository
carsonp6 Oct 23, 2025
5d8db0a
Sync from private repository
akanter Oct 23, 2025
5f1bca5
[spark-sdk] Simplify transfer integration tests
coreymartin Oct 23, 2025
9e205d8
Sync from private repository
akanter Oct 23, 2025
e5997a4
Sync from private repository
mohamedwane Oct 23, 2025
407d27a
Sync from private repository
santidmar Oct 23, 2025
6fd4940
Sync from private repository
santidmar Oct 23, 2025
85cf07d
Sync from private repository
santidmar Oct 23, 2025
850d54d
Sync from private repository
yellowred Oct 10, 2025
86e5595
Add ignored to comment code block
dangeross Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/actions/yarn-nm-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ runs:
if: inputs.enable-corepack == 'true'
shell: bash
working-directory: ${{ inputs.cwd }}
# echo tmp corepack enable, enable corepack, and echo inputs.enable-corepack value:
run: corepack enable

- name: ⚙️ Expose yarn config as "$GITHUB_OUTPUT"
Expand Down
4 changes: 3 additions & 1 deletion .lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ pre-commit:
- name: golangci-lint
run: golangci-lint run
- name: gotestsum
run: gotestsum --format testname $(go list ./... | grep -v -E "so/grpc_test|so/tree")
env:
GOFLAGS: "-tags=lightspark"
run: gotestsum --format testname $(go list ./... | grep -v -E "so/grpc_test|so/grpc_test_internal|so/tree")
- name: frost
glob: "signer/**"
root: "signer/"
Expand Down
78 changes: 49 additions & 29 deletions .mise.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[tools.atlas]
[[tools.atlas]]
version = "0.35.0"
backend = "aqua:ariga/atlas"

Expand All @@ -7,43 +7,43 @@ checksum = "sha256:86db4b4abee45969c06fe4a0a34674c853df316ac3a59ae8d07e296ac6ce3
size = 93071218
url = "https://release.ariga.io/atlas/atlas-darwin-arm64-v0.35.0"

[tools.go]
version = "1.24.6"
[[tools.go]]
version = "1.25.1"
backend = "core:go"

[tools.go.platforms.macos-arm64]
checksum = "sha256:4e29202c49573b953be7cc3500e1f8d9e66ddd12faa8cf0939a4951411e09a2a"
size = 76293244
url = "https://dl.google.com/go/go1.24.6.darwin-arm64.tar.gz"
checksum = "sha256:68deebb214f39d542e518ebb0598a406ab1b5a22bba8ec9ade9f55fb4dd94a6c"
size = 57906702
url = "https://dl.google.com/go/go1.25.1.darwin-arm64.tar.gz"

[tools.golangci-lint]
version = "2.2.2"
[[tools.golangci-lint]]
version = "2.4.0"
backend = "aqua:golangci/golangci-lint"

[tools.golangci-lint.platforms.macos-arm64]
checksum = "sha256:d84d94d042c0d495fd1746f3d18948a75de163b17a14e8de3ef840928dd2df74"
size = 13585670
url = "https://github.com/golangci/golangci-lint/releases/download/v2.2.2/golangci-lint-2.2.2-darwin-arm64.tar.gz"
[tools.golangci-lint.platforms.linux-x64]
checksum = "sha256:fae792524c04424c0ac369f5b8076f04b45cf29fc945a370e55d369a8dc11840"
size = 14126779
url = "https://github.com/golangci/golangci-lint/releases/download/v2.4.0/golangci-lint-2.4.0-linux-amd64.tar.gz"

[tools.gotestsum]
version = "1.12.0"
[[tools.gotestsum]]
version = "1.13.0"
backend = "aqua:gotestyourself/gotestsum"

[tools.gotestsum.platforms.macos-arm64]
checksum = "sha256:c5ffdc9054644c4db365de2197a12d21eff48b88a9ad20e3e0c29346802d0b41"
size = 2252304
url = "https://github.com/gotestyourself/gotestsum/releases/download/v1.12.0/gotestsum_1.12.0_darwin_arm64.tar.gz"
checksum = "sha256:509cb27aef747f48faf9bce424f59dcf79572c905204b990ee935bbfcc7fa0e9"
size = 2472317
url = "https://github.com/gotestyourself/gotestsum/releases/download/v1.13.0/gotestsum_1.13.0_darwin_arm64.tar.gz"

[tools.lefthook]
version = "1.11.14"
[[tools.lefthook]]
version = "2.0.0"
backend = "aqua:evilmartians/lefthook"

[tools.lefthook.platforms.macos-arm64]
checksum = "sha256:b9c68fabb3c9b71b18335fb886317ae068e0d4a8640f40ae21720fcbae130579"
size = 5286540
url = "https://github.com/evilmartians/lefthook/releases/download/v1.11.14/lefthook_1.11.14_MacOS_arm64.gz"
checksum = "sha256:0cf763fb55c05de17f7a7842fc9fd7044f1b7d1542129c1b2b8ae27c5769afb9"
size = 5747200
url = "https://github.com/evilmartians/lefthook/releases/download/v2.0.0/lefthook_2.0.0_MacOS_arm64.gz"

[tools.node]
[[tools.node]]
version = "20.19.0"
backend = "core:node"

Expand All @@ -52,42 +52,62 @@ checksum = "sha256:c016cd1975a264a29dc1b07c6fbe60d5df0a0c2beb4113c0450e3d998d1a0
size = 41487879
url = "https://nodejs.org/dist/v20.19.0/node-v20.19.0-darwin-arm64.tar.gz"

[tools.protoc]
[[tools.protoc]]
version = "29.3"
backend = "aqua:protocolbuffers/protobuf/protoc"

[tools.protoc.platforms.linux-x64]
checksum = "blake3:e69b7d6f33637cccd4e4cf4839b3d799ed02ae436e0eb555b0816b85cf341fb1"
size = 3288836
url = "https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protoc-29.3-linux-x86_64.zip"

[tools.protoc.platforms.macos-arm64]
checksum = "blake3:c5796cef7cf2c50cfc889d1cd821170c3d9158972175d46062879ff3757e42a4"
size = 2290929
url = "https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protoc-29.3-osx-aarch_64.zip"

[tools.protoc-gen-go]
[[tools.protoc-gen-go]]
version = "1.36.6"
backend = "aqua:protocolbuffers/protobuf-go/protoc-gen-go"

[tools.protoc-gen-go.platforms.linux-x64]
checksum = "blake3:404ea4268ed7ca4a4e2229ca6787558abf8b9fa6e1fb1052b13bec638a3f08fe"
size = 2389291
url = "https://github.com/protocolbuffers/protobuf-go/releases/download/v1.36.6/protoc-gen-go.v1.36.6.linux.amd64.tar.gz"

[tools.protoc-gen-go.platforms.macos-arm64]
checksum = "blake3:63a7dcee5c191e2527ec2f4da9e98cc97e8ef8b21beb97057e4aefbdd22f7286"
size = 2283775
url = "https://github.com/protocolbuffers/protobuf-go/releases/download/v1.36.6/protoc-gen-go.v1.36.6.darwin.arm64.tar.gz"

[tools.protoc-gen-go-grpc]
[[tools.protoc-gen-go-grpc]]
version = "1.5.1"
backend = "aqua:grpc/grpc-go/protoc-gen-go-grpc"

[tools.protoc-gen-go-grpc.platforms.linux-x64]
checksum = "blake3:197739132f0408f017d0c83773ac1ace85c0572473fdd658ec6e4ccbf20e0552"
size = 4859466
url = "https://github.com/grpc/grpc-go/releases/download/cmd/protoc-gen-go-grpc/v1.5.1/protoc-gen-go-grpc.v1.5.1.linux.amd64.tar.gz"

[tools.protoc-gen-go-grpc.platforms.macos-arm64]
checksum = "blake3:3c668207565d23ea2cf006d699207e3a804ebb929a534bd38a3b4ff4e941e00c"
size = 4565944
url = "https://github.com/grpc/grpc-go/releases/download/cmd/protoc-gen-go-grpc/v1.5.1/protoc-gen-go-grpc.v1.5.1.darwin.arm64.tar.gz"

[tools.protoc-gen-validate]
[[tools.protoc-gen-validate]]
version = "1.2.1"
backend = "aqua:bufbuild/protoc-gen-validate"

[tools.protoc-gen-validate.platforms.linux-x64]
checksum = "sha256:e7a1d7256184dc6824e8f8e4b672b1281013e321579daffd19b2e3e90b6f7d9f"
size = 13452368
url = "https://github.com/bufbuild/protoc-gen-validate/releases/download/v1.2.1/protoc-gen-validate_1.2.1_linux_amd64.tar.gz"

[tools.protoc-gen-validate.platforms.macos-arm64]
checksum = "sha256:44dfd7778a49febdfb088dacee835b5d649218b5277bdd7c98e2a1f8eb328b34"
size = 13557390
url = "https://github.com/bufbuild/protoc-gen-validate/releases/download/v1.2.1/protoc-gen-validate_1.2.1_darwin_arm64.tar.gz"

[tools.rust]
version = "1.85.0"
[[tools.rust]]
version = "1.90.0"
backend = "core:rust"
47 changes: 43 additions & 4 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[tools]
atlas = "0.35.0"
go = "1.24.6"
golangci-lint = "2.2.2"
gotestsum = "1.12.0"
go = "1.25.1"
golangci-lint = "2.4.0"
gotestsum = "1.13.0"
lefthook = "latest"
node = "20.19.0"
protoc = "29.3"
protoc-gen-go = "1.36.6"
protoc-gen-go-grpc = "1.5.1"
protoc-gen-validate = "1.2.1"
rust = "1.85.0"
rust = { version = "latest", profile = "minimal" }

[env]
MISE_NODE_COREPACK = true
Expand All @@ -26,9 +26,12 @@ spark-cli-dev-mainnet = { dir = "{{config_root}}/sdks/js", run = 'yarn install &
spark-cli-loadtest = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd examples/spark-cli && yarn build && yarn run cli:loadtest' }
test-go = { dir = "{{config_root}}/spark", run = 'mise test-unit-with-postgres' }
test-grpc = { dir = "{{config_root}}/spark", run = 'mise test-grpc' }
test-grpc-minikube = { dir = "{{config_root}}/spark", run = 'mise test-grpc-minikube' }
test-js = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn test' }
test-js-integration = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn test:integration' }
test-js-integration-minikube = { dir = "{{config_root}}/sdks/js", run = 'MINIKUBE_IP=$(minikube ip) yarn install && yarn test:integration' }
test-js-integration-ssp = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn test:integration:ssp' }
test-js-integration-ssp-minikube = { dir = "{{config_root}}/sdks/js", run = 'MINIKUBE_IP=$(minikube ip) yarn install && yarn test:integration:ssp' }

[tasks.money-dev]
description = "Send regtest BTC on dev to <address> [amount (default=0.0001)]"
Expand Down Expand Up @@ -56,6 +59,42 @@ run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
sendtoaddress {{arg(name="addr")}} {{arg(name="amount", default="0.0001")}}
"""

[tasks.mine-mk]
description = "Mine <blocks> to <address>"
usage = '''
arg "<blocks>" "amount of blocks to mine" default="5"
arg "<addr>" "the l1 address to generate to"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
generatetoaddress {{arg(name="blocks", default="5")}} {{arg(name="addr")}}
"""

[tasks.get-address-mk]
description = "gets a new l1 address"
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
getnewaddress
"""

[tasks.broadcast-tx-mk]
description = "Broadcast a <txn>"
usage = '''
arg "<hex>" "raw transaction hex"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
sendrawtransaction {{arg(name="hex")}}
"""

[settings]
activate_aggressive = true
disable_backends = ["asdf"]
experimental = true
lockfile = true
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.24-bookworm AS builder-go
FROM --platform=$BUILDPLATFORM golang:1.25-bookworm AS builder-go

ARG TARGETOS TARGETARCH
ARG DEBUG=0
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.4.13 && \


# (1) create rust env with cargo chef crate
FROM --platform=$BUILDPLATFORM rust:1.84-slim-bookworm AS chef
FROM --platform=$BUILDPLATFORM rust:1.90-slim-bookworm AS chef
WORKDIR /signer
RUN cargo install cargo-chef

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ spark/proto/%/%.pb.go: $(PROTO_DIR)/%.proto
--go-grpc_opt=paths=source_relative \
--validate_out="lang=go,paths=source_relative:$(dir $@)" \
$<
@if [ "$(notdir $<)" = "spark_ssp_internal.proto" ]; then \
echo "Adding build tag 'lightspark' to spark_ssp_internal generated files"; \
for file in $(dir $@)*.pb.go $(dir $@)*_grpc.pb.go $(dir $@)*.pb.validate.go; do \
if [ -f "$$file" ] && ! head -n1 "$$file" | grep -q "//go:build"; then \
printf '//go:build lightspark\n\n%s\n' "$$(cat "$$file")" > "$$file.tmp" && mv "$$file.tmp" "$$file"; \
fi \
done \
fi

# Default target
all: $(GO_OUT) copy-protos

Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,37 @@ mise lint
golangci-lint run
```

## Logging

We use [Zap](https://github.com/uber-go/zap) for logging in the SO. Here are some best practices:
- Zap includes APIs both for structured logging (with key-value pairs) and unstructured logging
(with `fmt`-style formatting), called "Sugared" and "Unsugared" respectively. Since we index
structured attribute keys in our logging backend, they should be reserved for common attributes
that we want searchable. For example:
- `error`: we use this for logging all errors (through `zap.Error`).
- `identity_public_key`: we use this for logging the identity of the public key that is making
a particular request.
It should _not_ be used for logging one-off attributes that don't have a clear purpose or common
meaning across the codebase, i.e. `count`, `value`, etc. Use unstructured logging for those. If
you're unsure, err towards unstructured logging.
- Converting between `zap.Logger` and `zap.SugaredLogger` is easy and cheap. Use `Logger.Sugar()`
to go from `zap.Logger` to `zap.SugaredLogger`, and `SugaredLogger.Desugar()` to go the other way.
- Most places in the codebase have a `zap.Logger` injected into the `Context` with common fields
already present. This includes all requests, tasks, and most other major components (i.e.
chainwatcher). Use `logging.GetLoggerFromContext` to get the logger instance from the context.
- Structured and unstructured logging can be mixed for a given log message. For example, the
following example is perfectly acceptable:
```go
logger := logging.GetLoggerFromContext(ctx)
...
logger.With(zap.Error(err)).Sugar().Infof("Failed to broadcast node tx for node %s", node.ID)

```
- Be mindful with what you log. Be extremely selective on logs that are logged on every request
(i.e. logs in middleware). Logs that describe regular execution are discouraged, instead logs
should be reserved for important events (abnormalities or errors). This is especially true
on high-traffic endpoints (i.e. read endpoints).

## Run tests

### Unit tests
Expand Down
25 changes: 25 additions & 0 deletions protos/gossip.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ message GossipMessage {
GossipMessageFinalizeExtendLeaf finalize_extend_leaf = 10;
GossipMessageRollbackUtxoSwap rollback_utxo_swap = 11;
GossipMessageDepositCleanup deposit_cleanup = 12;
GossipMessagePreimage preimage = 13;
GossipMessageFinalizeRenewRefundTimelock finalize_refund_timelock = 14;
GossipMessageFinalizeRenewNodeTimelock finalize_node_timelock = 15;
GossipMessageSettleSwapKeyTweak settle_swap_key_tweak = 16;
}
}

Expand Down Expand Up @@ -71,6 +75,15 @@ message GossipMessageFinalizeExtendLeaf {
repeated spark_internal.TreeNode internal_nodes = 1;
}

message GossipMessageFinalizeRenewRefundTimelock {
spark_internal.TreeNode node = 1;
}

message GossipMessageFinalizeRenewNodeTimelock {
spark_internal.TreeNode split_node = 1;
spark_internal.TreeNode node = 2;
}

// Rollback UTXO swap is called when Create UTXO swap transaction failed to
// fully complete. This reverts the state back to before the swap, allowing the
// user to initiate the UTXO swap again.
Expand All @@ -86,3 +99,15 @@ message GossipMessageRollbackUtxoSwap {
message GossipMessageDepositCleanup {
string tree_id = 1;
}

message GossipMessagePreimage {
bytes preimage = 1;
bytes payment_hash = 2;
}

// SettleSwapKeyTweak is called in Swap V3 flow when a counter transfer is
// created to settle both primary and counter transfer key tweaks atomically in the
// same DB transaction.
message GossipMessageSettleSwapKeyTweak {
string counter_transfer_id = 1;
}
21 changes: 0 additions & 21 deletions protos/mock.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import "google/protobuf/empty.proto";

service MockService {
rpc clean_up_preimage_share(CleanUpPreimageShareRequest) returns (google.protobuf.Empty) {}
rpc interrupt_transfer(InterruptTransferRequest) returns (google.protobuf.Empty) {}
rpc interrupt_coop_exit(InterruptCoopExitRequest) returns (google.protobuf.Empty) {}
rpc update_nodes_status(UpdateNodesStatusRequest) returns (google.protobuf.Empty) {}
// Triggers the execution of a scheduled task immediately by name. Used by hermetic tests
rpc trigger_task(TriggerTaskRequest) returns (google.protobuf.Empty) {}
Expand All @@ -18,15 +16,6 @@ message CleanUpPreimageShareRequest {
bytes payment_hash = 1;
}

message InterruptTransferRequest {
enum InterruptTransferAction {
NONE = 0;
INTERRUPT = 1;
RESUME = 2;
}
InterruptTransferAction action = 1;
}

message UpdateNodesStatusRequest {
repeated string node_ids = 1;
string status = 2;
Expand All @@ -36,13 +25,3 @@ message UpdateNodesStatusRequest {
message TriggerTaskRequest {
string task_name = 1;
}

message InterruptCoopExitRequest {
enum InterruptCoopExitAction {
NONE = 0;
INTERRUPT = 1;
RESUME = 2;
}
InterruptCoopExitAction action = 1;
string target_operator = 2; // optional, defaults to MockAction.TargetOperatorID
}
9 changes: 0 additions & 9 deletions protos/protos.iml

This file was deleted.

Loading