Skip to content

Commit 329f7dd

Browse files
authored
remove trait and replace with concrete impl (#2869)
## Linked Issues/PRs <!-- List of related issues/PRs --> ## Description <!-- List of detailed changes --> ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [ ] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else?
1 parent 8769da7 commit 329f7dd

File tree

10 files changed

+484
-256
lines changed

10 files changed

+484
-256
lines changed

Cargo.lock

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

bin/fuel-core/src/cli/run.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ impl Command {
714714
max_tx_update_subscriptions: tx_number_active_subscriptions,
715715
subscription_ttl,
716716
status_cache_ttl: status_cache_ttl.into(),
717+
// TODO: Where can I get this value?
718+
protocol_public_key: Default::default(),
717719
},
718720
};
719721
Ok(config)

crates/fuel-core/src/service/adapters/tx_status_manager.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ use fuel_core_tx_status_manager::ports::P2PPreConfirmationGossipData;
33

44
use super::P2PAdapter;
55

6-
pub mod signature_verification;
7-
86
#[cfg(feature = "p2p")]
97
impl fuel_core_tx_status_manager::ports::P2PSubscriptions for P2PAdapter {
108
type GossipedStatuses = P2PPreConfirmationGossipData;

crates/fuel-core/src/service/adapters/tx_status_manager/signature_verification.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.

crates/fuel-core/src/service/sub_services.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ use crate::{
6767
graphql_api::GraphQLBlockImporter,
6868
import_result_provider::ImportResultProvider,
6969
ready_signal::ReadySignal,
70-
tx_status_manager::signature_verification::PreconfirmationSignatureVerification,
7170
BlockImporterAdapter,
7271
BlockProducerAdapter,
7372
ChainStateInfoProvider,
@@ -257,11 +256,8 @@ pub fn init_sub_services(
257256
universal_gas_price_provider.clone(),
258257
);
259258

260-
let signature_verification = PreconfirmationSignatureVerification;
261-
262259
let tx_status_manager = fuel_core_tx_status_manager::new_service(
263260
p2p_adapter.clone(),
264-
signature_verification,
265261
config.tx_status_manager.clone(),
266262
);
267263
let tx_status_manager_adapter =

crates/services/tx_status_manager/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ anyhow = { workspace = true }
1313
async-trait = { workspace = true }
1414
derive_more = { workspace = true }
1515
fuel-core-services = { workspace = true }
16-
fuel-core-types = { workspace = true, features = ["std"] }
16+
fuel-core-types = { workspace = true, features = ["std", "serde"] }
1717
futures = { workspace = true }
1818
parking_lot = { workspace = true }
19+
postcard = { workspace = true }
1920
tokio = { workspace = true }
2021
tokio-stream = { workspace = true }
2122
tracing = { workspace = true }

crates/services/tx_status_manager/src/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use fuel_core_types::fuel_crypto::PublicKey;
12
use std::time::Duration;
23

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

1316
#[cfg(feature = "test-helpers")]
@@ -17,6 +20,7 @@ impl Default for Config {
1720
max_tx_update_subscriptions: 1000,
1821
subscription_ttl: Duration::from_secs(60 * 10),
1922
status_cache_ttl: Duration::from_secs(5),
23+
protocol_public_key: PublicKey::default(),
2024
}
2125
}
2226
}

0 commit comments

Comments
 (0)