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
2 changes: 1 addition & 1 deletion .github/custom/local-testnet/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ network:

port_publisher:
cl:
enabled: true
enabled: false

# Assertoor can only load from URLs here (for some reason). The placeholder is replaced in the workflow.
assertoor_params:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/local-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ jobs:

- name: Start Local Testnet with Assertoor
timeout-minutes: 30
run: kurtosis run --verbosity DETAILED --enclave localnet ssv-mini --args-file anchor/.github/custom/local-testnet/params.yaml
run: |
kurtosis clean -a || true
kurtosis run --verbosity DETAILED --enclave localnet ssv-mini --args-file anchor/.github/custom/local-testnet/params.yaml

- name: Await Assertoor Test Result
id: assertoor_test_result
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions anchor/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ async-broadcast = { workspace = true }
async-trait = "0.1.85"
discv5 = { workspace = true }
ethereum_ssz = { workspace = true }
fork = { workspace = true }
futures = { workspace = true }
global_config = { workspace = true }
gossipsub = { workspace = true }
Expand Down
20 changes: 14 additions & 6 deletions anchor/network/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,23 @@ impl<R: MessageReceiver> Network<R> {
self.handle_gossipsub_message(propagation_source, message_id, message);
}
gossipsub::Event::Subscribed { peer_id, topic } => {
if let Some(subnet) = topic::parse_subnet_id(&topic) {
self.peer_manager()
.set_peer_subscription(peer_id, subnet, true);
if let Some(parsed) = topic::parse_topic(&topic) {
self.peer_manager().set_peer_subscription(
peer_id,
parsed.fork,
parsed.subnet_id,
true,
);
}
}
gossipsub::Event::Unsubscribed { peer_id, topic } => {
if let Some(subnet) = topic::parse_subnet_id(&topic) {
self.peer_manager()
.set_peer_subscription(peer_id, subnet, false);
if let Some(parsed) = topic::parse_topic(&topic) {
self.peer_manager().set_peer_subscription(
peer_id,
parsed.fork,
parsed.subnet_id,
false,
);
}
}
_ => {
Expand Down
Loading
Loading