Skip to content

Commit

Permalink
Remove subnet service messages from snapshot tests.
Browse files Browse the repository at this point in the history
Subnet subscriptions are precomputed in advance in a separate task,
so subscription messages arrive to network service in non-deterministic time intervals,
and that breaks the tests.
  • Loading branch information
povi committed Apr 25, 2024
1 parent 83dec58 commit 5281223
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion grandine-snapshot-tests
Submodule grandine-snapshot-tests updated 98 files
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/001-take-messages-slot-0-propose.response
+1 −41 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/003-take-messages-slot-0-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/005-take-messages-slot-0-aggregate.response
+1 −37 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/007-take-messages-slot-1-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/009-take-messages-slot-1-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/011-take-messages-slot-1-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/013-take-messages-slot-2-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/015-take-messages-slot-2-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/017-take-messages-slot-2-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/019-take-messages-slot-3-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/021-take-messages-slot-3-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/023-take-messages-slot-3-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/025-take-messages-slot-4-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/027-take-messages-slot-4-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/029-take-messages-slot-4-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/031-take-messages-slot-5-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/033-take-messages-slot-5-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/035-take-messages-slot-5-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/037-take-messages-slot-6-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/039-take-messages-slot-6-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/041-take-messages-slot-6-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/043-take-messages-slot-7-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/045-take-messages-slot-7-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/047-take-messages-slot-7-aggregate.response
+1 −40 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/049-take-messages-slot-8-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/051-take-messages-slot-8-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/053-take-messages-slot-8-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/055-take-messages-slot-9-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/057-take-messages-slot-9-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/059-take-messages-slot-9-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/061-take-messages-slot-10-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/063-take-messages-slot-10-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/065-take-messages-slot-10-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/067-take-messages-slot-11-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/069-take-messages-slot-11-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/071-take-messages-slot-11-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/073-take-messages-slot-12-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/075-take-messages-slot-12-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/077-take-messages-slot-12-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/079-take-messages-slot-13-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/081-take-messages-slot-13-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/083-take-messages-slot-13-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/085-take-messages-slot-14-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/087-take-messages-slot-14-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/089-take-messages-slot-14-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/091-take-messages-slot-15-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/093-take-messages-slot-15-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/095-take-messages-slot-15-aggregate.response
+1 −40 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/097-take-messages-slot-16-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/099-take-messages-slot-16-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/101-take-messages-slot-16-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/103-take-messages-slot-17-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/105-take-messages-slot-17-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/107-take-messages-slot-17-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/109-take-messages-slot-18-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/111-take-messages-slot-18-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/113-take-messages-slot-18-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/115-take-messages-slot-19-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/117-take-messages-slot-19-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/119-take-messages-slot-19-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/121-take-messages-slot-20-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/123-take-messages-slot-20-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/125-take-messages-slot-20-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/127-take-messages-slot-21-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/129-take-messages-slot-21-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/131-take-messages-slot-21-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/133-take-messages-slot-22-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/135-take-messages-slot-22-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/137-take-messages-slot-22-aggregate.response
+1 −24 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/139-take-messages-slot-23-propose.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/141-take-messages-slot-23-attest.response
+1 −2 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/143-take-messages-slot-23-aggregate.response
+1 −40 minimal/rapid-upgrade/quick-start/all-keys/built-in-validator/145-take-messages-slot-24-propose.response
+1 −25 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/01-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/04-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/08-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/10-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/12-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/18-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/20-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/early-sync-committee-messages/23-take-messages.response
+1 −32 minimal/rapid-upgrade/quick-start/none/validator-flow/07-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/11-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/13-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/15-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/19-take-messages.response
+1 −37 minimal/rapid-upgrade/quick-start/none/validator-flow/21-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/24-take-messages.response
+1 −24 minimal/rapid-upgrade/quick-start/none/validator-flow/28-take-messages.response
+1 −40 minimal/rapid-upgrade/quick-start/none/validator-flow/35-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/38-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/40-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/46-take-messages.response
+1 −24 minimal/rapid-upgrade/quick-start/none/validator-flow/48-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/51-take-messages.response
+1 −32 minimal/rapid-upgrade/quick-start/none/validator-flow/55-take-messages.response
+1 −40 minimal/rapid-upgrade/quick-start/none/validator-flow/61-take-messages.response
+1 −2 minimal/rapid-upgrade/quick-start/none/validator-flow/64-take-messages.response
3 changes: 1 addition & 2 deletions http_api/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl<P: Preset> Context<P> {
let (pool_to_api_tx, pool_to_api_rx) = futures::channel::mpsc::unbounded();
let (pool_to_liveness_tx, pool_to_liveness_rx) = futures::channel::mpsc::unbounded();
let (pool_to_p2p_tx, pool_to_p2p_rx) = futures::channel::mpsc::unbounded();
let (subnet_service_to_p2p_tx, subnet_service_to_p2p_rx) =
let (subnet_service_to_p2p_tx, _subnet_service_to_p2p_rx) =
futures::channel::mpsc::unbounded();
let (sync_to_api_tx, sync_to_api_rx) = futures::channel::mpsc::unbounded();
let (subnet_service_tx, subnet_service_rx) = futures::channel::mpsc::unbounded();
Expand Down Expand Up @@ -332,7 +332,6 @@ impl<P: Preset> Context<P> {
fc_to_p2p_rx: Arc::new(Mutex::new(fc_to_p2p_rx)),
fc_to_sync_rx: Arc::new(Mutex::new(fc_to_sync_rx)),
pool_to_p2p_rx: Arc::new(Mutex::new(pool_to_p2p_rx)),
subnet_service_to_p2p_rx: Arc::new(Mutex::new(subnet_service_to_p2p_rx)),
validator_to_p2p_rx: Arc::new(Mutex::new(validator_to_p2p_rx)),
};

Expand Down
3 changes: 1 addition & 2 deletions http_api/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use ::{
crossbeam_utils::sync::WaitGroup,
fork_choice_control::{P2pMessage, SyncMessage},
operation_pools::PoolToP2pMessage,
p2p::{SubnetServiceToP2p, ValidatorToP2p},
p2p::ValidatorToP2p,
};

#[cfg(test)]
Expand Down Expand Up @@ -201,7 +201,6 @@ pub struct TestState<P: Preset> {
pub fc_to_p2p_rx: SpyReceiver<P2pMessage<P>>,
pub fc_to_sync_rx: SpyReceiver<SyncMessage<P>>,
pub pool_to_p2p_rx: SpyReceiver<PoolToP2pMessage>,
pub subnet_service_to_p2p_rx: SpyReceiver<SubnetServiceToP2p>,
pub validator_to_p2p_rx: SpyReceiver<ValidatorToP2p<P>>,
}

Expand Down
5 changes: 1 addition & 4 deletions http_api/src/test_endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{extract::State, Json};
use clock::Tick;
use fork_choice_control::{P2pMessage, SyncMessage};
use operation_pools::PoolToP2pMessage;
use p2p::{ApiToP2p, SubnetServiceToP2p, ValidatorToP2p};
use p2p::{ApiToP2p, ValidatorToP2p};
use serde::Serialize;
use types::preset::Preset;

Expand All @@ -21,7 +21,6 @@ pub struct TakeMessagesResponse<P: Preset> {
fc_to_p2p: Vec<P2pMessage<P>>,
fc_to_sync: Vec<SyncMessage<P>>,
pool_to_p2p: Vec<PoolToP2pMessage>,
subnet_service_to_p2p: Vec<SubnetServiceToP2p>,
validator_to_p2p: Vec<ValidatorToP2p<P>>,
}

Expand Down Expand Up @@ -56,7 +55,6 @@ pub async fn post_take_messages<P: Preset>(
fc_to_p2p_rx,
fc_to_sync_rx,
pool_to_p2p_rx,
subnet_service_to_p2p_rx,
validator_to_p2p_rx,
} = test_state;

Expand All @@ -65,7 +63,6 @@ pub async fn post_take_messages<P: Preset>(
fc_to_p2p: take(fc_to_p2p_rx).await,
fc_to_sync: take(fc_to_sync_rx).await,
pool_to_p2p: take(pool_to_p2p_rx).await,
subnet_service_to_p2p: take(subnet_service_to_p2p_rx).await,
validator_to_p2p: take(validator_to_p2p_rx).await,
})
}

0 comments on commit 5281223

Please sign in to comment.