---
# System prepended metadata

title: Altair testing

---

# Altair testing

## Discovery

### Changes

1.  Added syncnets to enr
2.  Added syncnets to metadata
3.  Adds module for handling sync committee subscriptions from the vc (subscribe/unsubscribe/update_enr/discover_subnet_peers)

### Stuff to test

- [ ] Sync committee peers are long lived (1 day) so we need a way to maintain healthy number of peers over the sync committee period. Currently doing this in the peer manager. Need to test this in a testnet with even distribution of validators (i.e. not all sync committee members being managed by 1-2 validator clients)
- [ ] It should be harder to find peers in sync committee subnets compared to attestation subnets as they are fewer peers in sync committees. Check how long it takes to find sync committee peers. Might potentially have to increase retries for sync subnet searches). Again needs to be tested in a larger network
- [x] Need to make sure that non-updated lighthouse nodes can find updated lighthouse nodes because of enr predicate mismatches (This issue https://github.com/sigp/lighthouse/pull/2302#discussion_r640024752)

## RPC

### Changes

1.  Added `ForkContext` to keep track of ForkName -> ContextBytes mappings as well as current_fork based on wall clock slot.
2.  Added a Version::V2 in rpc and decode the messages based on fork_context and version.
3.  Make ssz_snappy.rs more modular

### Stuff to test

1.  Need to test long syncs on multi client altair networks. Currently, just tested long syncs on prater so not enough testing for altair code paths.
2.  Testing on the peer scoring around receving blocks on wrong fork_id. e.g. receving a phase 0 block for an altair slot is a fatal peer action. Need to test these code paths in testnets
3.  Think of potential attacks in the decoding code (it has grown in complexity)

## Gossip

### Changes

1.  Added sync committee topics
2.  changes in `network/service.rs` to subscribe to topics on multiple fork ids pre-fork and post fork.
3.  Add fork switching logic
    1.  Update enr fork id
    2.  Update `current_fork` in shared `ForkContext` object
    3.  Unsubscribe from pre-fork topics after fork
4.  Change gossipsub_message_id function.

### Stuff to test

1.  test sync committee message queues in the beacon processor to check for ideal queue sizes for messages. Also need to check if we need debounce (not sure why that's needed for attestations).
2.  verify severity of gossipsub downscoring on different sync committee errors (in gossip_methods.rs)
3.  check metrics on number of messages in old fork topics v/s new fork topics after fork. Messages on pre fork topics should dip and then stop completely post fork.
4.  Local testnets should ideally never have sync_aggregate != 32 (or 24 if there are no aggregators for the slot which is more likely in smaller networks). Test fullness of sync aggregates in larger networks. 
5.  Test effect of skip slots on fork boundary and sync committee boundaries.