Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI flags to delay publishing for edge case testing on PeerDAS devnets #6919

Open
jimmygchen opened this issue Feb 6, 2025 · 4 comments
Assignees
Labels
das Data Availability Sampling fulu Required for the upcoming Fulu hard fork low-hanging-fruit Easy to resolve, get it before someone else does!

Comments

@jimmygchen
Copy link
Member

It would be useful to add some CLI flags on the beacon node to test out some unhappy cases on PeerDAS devnets, for example:

  • --delay-block-publishing <seconds>
  • --delay-data-column-publishing <seconds>

These can be used for testing late publishing and recovery from missed/orphaned blocks on devnets.

These should be hidden flags and must be explicitly state as testing only flags.

@jimmygchen jimmygchen added das Data Availability Sampling fulu Required for the upcoming Fulu hard fork low-hanging-fruit Easy to resolve, get it before someone else does! labels Feb 6, 2025
@kamuik16
Copy link
Contributor

kamuik16 commented Feb 6, 2025

Hey @jimmygchen, do you mind if I raise a PR and help out with this issue?

@jimmygchen
Copy link
Member Author

Hey Krishang 👋 how is it going?
Sure, that would be amazing!

@kamuik16
Copy link
Contributor

kamuik16 commented Feb 6, 2025

Hey, thanks, just to make sure, I need to add the --delay-block-publishing & --delay-data-column-publishing flags in beacon_node/src/cli.rs. Then the values I get from these flags should be used to set which of the values?

@jimmygchen
Copy link
Member Author

Yep that's correct - and we want to use these config values (if present) to delay block / data column publishing, the publish logic can be found in this function:

/// Handles a request from the HTTP API for full blocks.
#[allow(clippy::too_many_arguments)]
pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlock<T>>(
block_root: Option<Hash256>,
provenanced_block: ProvenancedBlock<T, B>,
chain: Arc<BeaconChain<T>>,
network_tx: &UnboundedSender<NetworkMessage<T::EthSpec>>,
log: Logger,
validation_level: BroadcastValidation,
duplicate_status_code: StatusCode,
network_globals: Arc<NetworkGlobals<T::EthSpec>>,
) -> Result<Response, Rejection> {

In this function you have access to the config parameters via chain.config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling fulu Required for the upcoming Fulu hard fork low-hanging-fruit Easy to resolve, get it before someone else does!
Projects
None yet
Development

No branches or pull requests

2 participants