Skip to content

feat: support testnet4 #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2025
Merged

feat: support testnet4 #144

merged 2 commits into from
Jun 19, 2025

Conversation

zoedberg
Copy link

I have rebased the code from #91 since that has merge conflicts and it seems it's dormant since 2 months. I also removed some changes that I think were not necessary (probably there to update rust-bitcoin, which has been already done on the updated tip) and formatted the code with the latest Rust stable version. Moreover I would have renamed the existing Testnet variant to Testnet3, but this is not a decision I should take so let me know if this looks good to you or if you want me to make some changes.

@zoedberg zoedberg changed the title feat: testnet4 is supported with the latest rust-bitcoin feat: support testnet4 Feb 24, 2025
@pseudozach
Copy link

what's next for this PR? how can we help get this merged so esplora can have testnet4 support?

@zoedberg
Copy link
Author

The PR is waiting for a review. As soon as this gets merged I will open a PR on https://github.com/Blockstream/esplora/ (esplora code is ready but it requires electrs code to be merged into the default branch).

Copy link

@pseudozach pseudozach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@RCasatta would you have time to take a look please and thank you 🙏

PR is just adding testnet4 related ports and variables afaict.

Copy link
Collaborator

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, some minor comments

checked used port 48332 matches bitcoin core

RCasatta
RCasatta previously approved these changes Jun 9, 2025
Copy link
Collaborator

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 2163573

I didn't test it actually works on testnet4 but it should

@zoedberg
Copy link
Author

zoedberg commented Jun 9, 2025

@RCasatta if you prefer to test it before merging you can use Blockstream/esplora#570 (just remember to change the clone url in contrib/Dockerfile.base)

Copy link
Collaborator

@shesek shesek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny nit, all looks good other than that. Thanks!

@shesek
Copy link
Collaborator

shesek commented Jun 9, 2025

I confirmed that d51c0dc matches the changes introduced by cargo fmt (minus one minor difference, probably due to a different cargo version)

$ git checkout new-index # 208491fa40a993a47, zoed/testnet4^^
$ cargo fmt
$ git diff zoed/testnet4^ # d51c0dc2b668d9d7043
diff --git a/src/new_index/mempool.rs b/src/new_index/mempool.rs
index 6d318d2..e11754b 100644
--- a/src/new_index/mempool.rs
+++ b/src/new_index/mempool.rs
@@ -3,7 +3,6 @@ use itertools::{Either, Itertools};
 
 #[cfg(not(feature = "liquid"))]
 use bitcoin::consensus::encode::serialize;
-use electrs_macros::trace;
 #[cfg(feature = "liquid")]
 use elements::{encode::serialize, AssetId};
 
@@ -23,6 +22,7 @@ use crate::new_index::{
 };
 use crate::util::fees::{make_fee_histogram, TxFeeInfo};
 use crate::util::{extract_tx_prevouts, full_hash, get_prev_outpoints, is_spendable, Bytes};
+use electrs_macros::trace;
 
 #[cfg(feature = "liquid")]
 use crate::elements::asset;

Copy link
Collaborator

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 117d952

@philippem
Copy link
Collaborator

tack

@philippem philippem merged commit cd270cd into Blockstream:new-index Jun 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants