Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
956 changes: 597 additions & 359 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [ "Ash Manning <ash@layertwolabs.com>" ]
edition = "2024"
license-file = "LICENSE.txt"
publish = false
version = "0.10.7"
version = "0.11.0"

[workspace.dependencies]
anyhow = "1.0.72"
Expand Down Expand Up @@ -39,13 +39,13 @@ uuid = "1.13.1"

[workspace.dependencies.bip300301_enforcer_lib]
default-features = false
git = "https://github.com/Ash-L2L/bip300301_enforcer"
rev = "273fee8295aa55314333342ad6479b488cae3a0a"
git = "https://github.com/LayerTwo-Labs/bip300301_enforcer"
rev = "933ffcdd988959f2bb9bd7dd89d1cbb23c2f52c4"

[workspace.dependencies.bip300301_enforcer_integration_tests]
default-features = false
git = "https://github.com/Ash-L2L/bip300301_enforcer"
rev = "273fee8295aa55314333342ad6479b488cae3a0a"
git = "https://github.com/LayerTwo-Labs/bip300301_enforcer"
rev = "933ffcdd988959f2bb9bd7dd89d1cbb23c2f52c4"

[workspace.dependencies.l2l-openapi]
git = "https://github.com/Ash-L2L/l2l-openapi"
Expand Down
5 changes: 2 additions & 3 deletions app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ impl App {
.await?
{
return Err(tonic::Status::aborted(format!(
"{} is not supported in mainchain client",
validator_service_name
"{validator_service_name} is not supported in mainchain client",
)));
}
tracing::info!("Verified existence of {}", validator_service_name);
Expand Down Expand Up @@ -237,7 +236,7 @@ impl App {
config.network,
cusf_mainchain,
cusf_mainchain_wallet,
local_pool.clone(),
&runtime,
#[cfg(feature = "zmq")]
config.zmq_addr,
))?;
Expand Down
20 changes: 8 additions & 12 deletions app/gui/bitnames/all_bitnames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,15 @@ impl AllBitNames {
if let Some(bitname_data) = bitnames.get(&name_hash_pattern) {
show_bitname_with_data(ui, &name_hash_pattern, bitname_data);
};
if let Ok(bitname_id_pattern) = BitName::from_hex(&self.query) {
if let Some(bitname_data) = bitnames.get(&bitname_id_pattern) {
show_bitname_with_data(
ui,
&bitname_id_pattern,
bitname_data,
);
}
if let Ok(bitname_id_pattern) = BitName::from_hex(&self.query)
&& let Some(bitname_data) = bitnames.get(&bitname_id_pattern)
{
show_bitname_with_data(ui, &bitname_id_pattern, bitname_data);
};
if let Ok(seq_id_pattern) = BitNameSeqId::from_str(&self.query) {
if let Some(bitname) = seq_id_to_bitname.get(&seq_id_pattern) {
show_bitname_with_data(ui, bitname, &bitnames[bitname]);
}
if let Ok(seq_id_pattern) = BitNameSeqId::from_str(&self.query)
&& let Some(bitname) = seq_id_to_bitname.get(&seq_id_pattern)
{
show_bitname_with_data(ui, bitname, &bitnames[bitname]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/gui/coins/tx_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl TxBuilder {
self.tx_creator.value_in = value_in;
spent_utxos.sort_by_key(|(outpoint, _)| format!("{outpoint}"));
ui.separator();
ui.monospace(format!("Total: {}", value_in));
ui.monospace(format!("Total: {value_in}"));
ui.separator();
egui::Grid::new("utxos").striped(true).show(ui, |ui| {
ui.monospace("kind");
Expand Down Expand Up @@ -70,7 +70,7 @@ impl TxBuilder {
let value_out: bitcoin::Amount =
self.base_tx.outputs.iter().map(GetValue::get_value).sum();
self.tx_creator.value_out = value_out;
ui.monospace(format!("Total: {}", value_out));
ui.monospace(format!("Total: {value_out}"));
ui.separator();
egui::Grid::new("outputs").striped(true).show(ui, |ui| {
let mut remove = None;
Expand Down
8 changes: 4 additions & 4 deletions app/gui/coins/tx_creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ impl TxCreator {
Ok(None) => option_dropdown.join(),
Err(ref mut bad_value) => {
let text_edit = ui.add(egui::TextEdit::singleline(bad_value));
if text_edit.changed() {
if let Ok(value) = try_from_str(bad_value.clone()) {
try_set.0 = Ok(Some(value));
}
if text_edit.changed()
&& let Ok(value) = try_from_str(bad_value.clone())
{
try_set.0 = Ok(Some(value));
}
option_dropdown.join() | text_edit
}
Expand Down
2 changes: 1 addition & 1 deletion app/gui/coins/utxo_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl UtxoSelector {
})
.unwrap_or_default();
ui.separator();
ui.monospace(format!("Total: {}", total));
ui.monospace(format!("Total: {total}"));
ui.separator();
egui::Grid::new("utxos").striped(true).show(ui, |ui| {
ui.monospace("kind");
Expand Down
12 changes: 12 additions & 0 deletions app/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,20 @@ fn set_tracing_subscriber(
("", saturating_pred_level(log_level)),
("bip300301", log_level),
("jsonrpsee_core::tracing", log_level),
(
"h2::codec::framed_read",
saturating_pred_level(saturating_pred_level(log_level)),
),
(
"h2::codec::framed_write",
saturating_pred_level(saturating_pred_level(log_level)),
),
("plain_bitnames", log_level),
("plain_bitnames_app", log_level),
(
"tower::buffer::worker",
saturating_pred_level(saturating_pred_level(log_level)),
),
]);
let directives_str =
match std::env::var(tracing_filter::EnvFilter::DEFAULT_ENV) {
Expand Down
4 changes: 2 additions & 2 deletions cli/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ where
.mutable_data
.commitment
.ok_or_else(|| anyhow::anyhow!("No commitment resolved"))?;
let http_client = HttpClientBuilder::default()
.build(format!("http://{}", socket_addr))?;
let http_client =
HttpClientBuilder::default().build(format!("http://{socket_addr}"))?;
let mut bitname_commit = http_client.bitname_commit(None).await?;
let canonical_bytes = serde_json_canonicalizer::to_vec(&bitname_commit)?;
let canonical_hash: plain_bitnames::types::Hash =
Expand Down
4 changes: 2 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories
allow-git = [
"https://github.com/Ash-L2L/bip300301.git",
"https://github.com/Ash-L2L/bip300301_enforcer.git",
"https://github.com/Ash-L2L/l2l-openapi.git",
"https://gitlab.com/A-Manning/leonhard-llc-ops",
"https://github.com/erikjohnston/ouroboros.git?rev=ea82b33947f60c511dac6eb3815b6af3f6c3f555",
"https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git",
"https://github.com/LayerTwo-Labs/bip300301_enforcer.git",
"https://github.com/mit-dci/rustreexo.git",
"https://github.com/torkelrogstad/cusf-enforcer-mempool.git",
]

Expand Down
7 changes: 7 additions & 0 deletions integration_tests/ibd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ async fn initial_block_download_task(
tracing::debug!("Sender has connection to syncer");
// Wait for sync to occur
sleep(std::time::Duration::from_secs(10)).await;
// Check peer connections
let () = check_peer_connection(
&bitnames_nodes.syncer,
bitnames_nodes.sender.net_addr().into(),
)
.await?;
tracing::debug!("Syncer still has connection to sender");
// Check that sender and syncer have all blocks
{
let sender_blocks =
Expand Down
12 changes: 12 additions & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tonic-build = "0.12.3"
[dependencies]
addr = "0.15.6"
anyhow = { workspace = true, features = ["backtrace"] }
async-lock = "3.4.0"
bech32 = "0.11.0"
bincode = { workspace = true }
bitcoin = { workspace = true, features = ["serde"] }
Expand Down Expand Up @@ -63,6 +64,17 @@ zeromq = { version = "0.4.1", optional = true }
clap = ["dep:clap"]
zmq = ["dep:zeromq"]

[dependencies.educe]
version = "0.6.0"
default-features = false
features = ["Clone", "Debug"]


[dependencies.governor]
version = "0.8.1"
default-features = false
features = ["quanta", "std"]

[lints]
workspace = true

Expand Down
Loading
Loading