Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7876706
WIP
MitchTurner Mar 10, 2025
1e27960
Add basic trait for adding delegate key
MitchTurner Mar 11, 2025
8b3eb35
Add tests for verifying incoming preconfirmation signatures
MitchTurner Mar 11, 2025
136ff89
Include test for tracking preconfirmations that return too early for …
MitchTurner Mar 12, 2025
37579b6
Cleanup
MitchTurner Mar 12, 2025
af74f22
Update CHANGELOG
MitchTurner Mar 12, 2025
fdd2dc6
Merge branch 'master' into feature/pre-confirmations/implement-signat…
MitchTurner Mar 12, 2025
a0b531f
Add basic impl
MitchTurner Mar 12, 2025
c056e36
Fix trait method signature
MitchTurner Mar 12, 2025
6683c41
Merge branch 'master' into feature/pre-confirmations/implement-signat…
xgreenx Mar 12, 2025
b26bbd3
Update crates/services/tx_status_manager/src/service.rs
MitchTurner Mar 13, 2025
8769da7
Merge branch 'master' into feature/pre-confirmations/implement-signat…
AurelienFT Mar 13, 2025
329f7dd
remove trait and replace with concrete impl (#2869)
MitchTurner Mar 14, 2025
bdbc5fc
Merge branch 'master' into feature/pre-confirmations/implement-signat…
MitchTurner Mar 14, 2025
85b5afe
Merge branch 'master' into feature/pre-confirmations/implement-signat…
MitchTurner Mar 14, 2025
f60f793
Use `ConsensusConfig` to get `PublicKey` (`Address` actually)
MitchTurner Mar 14, 2025
7d44a66
Avoid DoS vector by removing `early_preconfirmations` concept and test
MitchTurner Mar 14, 2025
4f40fc0
Apply suggestions from code review
xgreenx Mar 15, 2025
b012cdb
Fix compilation
xgreenx Mar 15, 2025
0402595
Merge branch 'master' into feature/pre-confirmations/implement-signat…
xgreenx Mar 15, 2025
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
1 change: 1 addition & 0 deletions .changes/added/2856.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add generic logic for managing the signatures and delegate keys for pre-confirmations signatures
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions bin/fuel-core/src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ impl Command {
max_tx_update_subscriptions: tx_number_active_subscriptions,
subscription_ttl,
status_cache_ttl: status_cache_ttl.into(),
// TODO: Where can I get this value?
protocol_public_key: Default::default(),
},
};
Ok(config)
Expand Down
19 changes: 9 additions & 10 deletions crates/fuel-core/src/service/sub_services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ use crate::service::adapters::consensus_module::poa::pre_confirmation_signature:
tx_receiver::PreconfirmationsReceiver,
};

use super::{
adapters::{
FuelBlockSigner,
P2PAdapter,
TxStatusManagerAdapter,
},
genesis::create_genesis_block,
DbType,
};
use crate::{
combined_database::CombinedDatabase,
database::Database,
Expand Down Expand Up @@ -76,16 +85,6 @@ use crate::{
},
};

use super::{
adapters::{
FuelBlockSigner,
P2PAdapter,
TxStatusManagerAdapter,
},
genesis::create_genesis_block,
DbType,
};

pub type PoAService = fuel_core_poa::Service<
TxPoolAdapter,
BlockProducerAdapter,
Expand Down
4 changes: 3 additions & 1 deletion crates/services/tx_status_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ anyhow = { workspace = true }
async-trait = { workspace = true }
derive_more = { workspace = true }
fuel-core-services = { workspace = true }
fuel-core-types = { workspace = true, features = ["std"] }
fuel-core-types = { workspace = true, features = ["std", "serde"] }
futures = { workspace = true }
parking_lot = { workspace = true }
postcard = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tracing = { workspace = true }
Expand All @@ -30,6 +31,7 @@ test-case = { workspace = true }
test-strategy = { workspace = true }
tokio = { workspace = true, features = ["test-util", "macros"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

[features]
test-helpers = ["fuel-core-types/test-helpers"]
4 changes: 4 additions & 0 deletions crates/services/tx_status_manager/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use fuel_core_types::fuel_crypto::PublicKey;
use std::time::Duration;

#[derive(Clone, Debug)]
Expand All @@ -8,6 +9,8 @@ pub struct Config {
pub subscription_ttl: Duration,
/// Maximum time to keep the status in the cache of the manager.
pub status_cache_ttl: Duration,
/// Protocol Signing Key, i.e. the block signer's public key
pub protocol_public_key: PublicKey,
}

#[cfg(feature = "test-helpers")]
Expand All @@ -17,6 +20,7 @@ impl Default for Config {
max_tx_update_subscriptions: 1000,
subscription_ttl: Duration::from_secs(60 * 10),
status_cache_ttl: Duration::from_secs(5),
protocol_public_key: PublicKey::default(),
}
}
}
2 changes: 1 addition & 1 deletion crates/services/tx_status_manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub mod config;
mod error;
mod manager;
pub mod ports;
mod service;
pub mod service;
mod subscriptions;
mod tx_status_stream;
mod update_sender;
Expand Down
Loading
Loading