Skip to content

feat(e2e tests): invalid block penalizes peer #228

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jonastheis
Copy link

@jonastheis jonastheis commented Aug 1, 2025

This PR addresses the following item of #141:

Invalid block that is gossiped over the network should be rejected and the peer should be penalized.

@jonastheis jonastheis marked this pull request as ready for review August 1, 2025 06:54
Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit and I think we can remove the get_network_handle method.

Comment on lines +3 to 4
#[derive(Debug)]
/// A type that represents the result of the engine driver future.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we do comments then derive

Comment on lines +206 to +211
let node0_rmn_handle = nodes[0].inner.add_ons_handle.rollup_manager_handle.clone();
let node0_network_handle = node0_rmn_handle.get_network_handle().await.unwrap();
let node0_id = node0_network_handle.inner().peer_id();

let node1_rnm_handle = nodes[1].inner.add_ons_handle.rollup_manager_handle.clone();
let node1_network_handle = node1_rnm_handle.get_network_handle().await.unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be mistaking but isn't it possible to use nodes[i].inner.network?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked and we could just use nodes[i].inner.network, just need to update the announce_block method to:

    let block = NewBlock {
        block: ScrollBlock {
            header: Header {
                extra_data: Signature::new(U256::ONE, U256::ONE, false).as_bytes().into(),
                ..Default::default()
            },
            ..Default::default()
        },
        ..Default::default()
    };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants