Skip to content

Commit e990d5f

Browse files
authored
Merge pull request #1 from LayerTwo-Labs/2026-03-31-backport-thunder-0.14.0
Backport Thunder 0.14.0
2 parents 96c3117 + bc469e1 commit e990d5f

21 files changed

Lines changed: 614 additions & 263 deletions

.github/workflows/check_lint_build.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ jobs:
6161
chmod +x bitcoin-patched-bins/bitcoin-cli
6262
popd
6363
64+
- name: Download bitcoin unpatched
65+
run: |
66+
pushd ..
67+
wget https://bitcoincore.org/bin/bitcoin-core-30.2/bitcoin-30.2-x86_64-linux-gnu.tar.gz
68+
tar -xf bitcoin-30.2-x86_64-linux-gnu.tar.gz
69+
rm bitcoin-30.2-x86_64-linux-gnu.tar.gz
70+
mv bitcoin-30.2/bin bitcoin-unpatched-bins
71+
rm -r bitcoin-30.2
72+
popd
73+
6474
- name: Download latest bip300301_enforcer
6575
run: |
6676
pushd ..
@@ -113,6 +123,7 @@ jobs:
113123
run: |
114124
export BIP300301_ENFORCER='../bip300301-enforcer'
115125
export BITCOIND='../bitcoin-patched-bins/bitcoind'
126+
export BITCOIND_UNPATCHED='../bitcoin-unpatched-bins/bitcoind'
116127
export BITCOIN_CLI='../bitcoin-patched-bins/bitcoin-cli'
117128
export ELECTRS='../electrs/target/release/electrs'
118129
export PHOTON_APP='target/release/photon_app'

Cargo.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ uuid = "1.13.1"
3939
[workspace.dependencies.bip300301_enforcer_lib]
4040
default-features = false
4141
git = "https://github.com/LayerTwo-Labs/bip300301_enforcer"
42-
rev = "a8d169ee34aeddf6d354aa52376d847831d7fbb3"
42+
rev = "9c3eb0bdcb5b9a458e6f92cafb8bdbf76a860f74"
4343

4444
[workspace.dependencies.bip300301_enforcer_integration_tests]
4545
default-features = false
4646
git = "https://github.com/LayerTwo-Labs/bip300301_enforcer"
47-
rev = "a8d169ee34aeddf6d354aa52376d847831d7fbb3"
47+
rev = "9c3eb0bdcb5b9a458e6f92cafb8bdbf76a860f74"
4848

4949
[workspace.dependencies.l2l-openapi]
5050
git = "https://github.com/Ash-L2L/l2l-openapi"

app/gui/withdrawals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ impl Withdrawals {
1010
pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) {
1111
ui.heading("Pending withdrawals");
1212
let bundle = app.and_then(|app| {
13-
app.node.get_pending_withdrawal_bundle().ok().flatten()
13+
app.node.try_get_pending_withdrawal_bundle().ok().flatten()
1414
});
1515
if let Some(bundle) = bundle {
1616
let mut spent_utxos: Vec<_> = bundle.spend_utxos().iter().collect();

app/rpc_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl RpcServer for RpcServerImpl {
206206
) -> RpcResult<Option<WithdrawalBundle>> {
207207
self.app
208208
.node
209-
.get_pending_withdrawal_bundle()
209+
.try_get_pending_withdrawal_bundle()
210210
.map_err(custom_err)
211211
}
212212

integration_tests/example.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
BIP300301_ENFORCER='../bip300301_enforcer/target/debug/bip300301_enforcer'
2-
BITCOIND='../bitcoin/build/src/bitcoind'
2+
BITCOIND='../bitcoin-patched/build/src/bitcoind'
3+
BITCOIND_UNPATCHED='../bitcoin/build/src/bitcoind'
34
BITCOIN_CLI='../bitcoin/build/src/bitcoin-cli'
45
ELECTRS='../electrs/target/release/electrs'
56
PHOTON_APP='target/debug/photon_app'

integration_tests/ibd.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ use std::net::SocketAddr;
55
use bip300301_enforcer_integration_tests::{
66
integration_test::{activate_sidechain, fund_enforcer, propose_sidechain},
77
setup::{
8-
Mode, Network, PostSetup as EnforcerPostSetup, Sidechain as _,
9-
setup as setup_enforcer,
8+
Mode, Network, PostSetup as EnforcerPostSetup,
9+
PreSetup as EnforcerPreSetup, SetupOpts as EnforcerSetupOpts,
10+
Sidechain as _,
1011
},
1112
util::{AbortOnDrop, AsyncTrial, TestFailureCollector, TestFileRegistry},
1213
};
@@ -33,13 +34,14 @@ async fn setup(
3334
bin_paths: BinPaths,
3435
res_tx: mpsc::UnboundedSender<anyhow::Result<()>>,
3536
) -> anyhow::Result<(EnforcerPostSetup, PhotonNodes)> {
36-
let mut enforcer_post_setup = setup_enforcer(
37-
&bin_paths.others,
38-
Network::Regtest,
39-
Mode::Mempool,
40-
res_tx.clone(),
41-
)
42-
.await?;
37+
let enforcer_pre_setup =
38+
EnforcerPreSetup::new(bin_paths.others, Network::Regtest)?;
39+
let mut enforcer_post_setup = {
40+
let setup_opts: EnforcerSetupOpts = Default::default();
41+
enforcer_pre_setup
42+
.setup(Mode::Mempool, setup_opts, res_tx.clone())
43+
.await?
44+
};
4345
let sidechain_sender = PostSetup::setup(
4446
Init {
4547
photon_app: bin_paths.photon.clone(),

0 commit comments

Comments
 (0)