Skip to content

Add validity check to finalization#111

Merged
gaudenzkessler merged 3 commits intodevelopfrom
gk/add_validity_check_to_finalization
Oct 27, 2022
Merged

Add validity check to finalization#111
gaudenzkessler merged 3 commits intodevelopfrom
gk/add_validity_check_to_finalization

Conversation

@gaudenzkessler
Copy link
Contributor

No description provided.

@gaudenzkessler gaudenzkessler force-pushed the gk/add_validity_check_to_finalization branch from f13a6fb to 6170b11 Compare October 27, 2022 13:38
@gaudenzkessler gaudenzkessler force-pushed the gk/add_validity_check_to_finalization branch from 6170b11 to e3cb627 Compare October 27, 2022 13:38
@gaudenzkessler gaudenzkessler force-pushed the gk/add_validity_check_to_finalization branch from 1dd53ba to eed4a65 Compare October 27, 2022 13:49
Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Perfect, thanks for the extra mile!

Comment on lines +28 to +51
#[test]
fn confirm_imported_sidechain_block_invalid_next_finalization_candidate() {
new_test_ext().execute_with(|| {
Timestamp::set_timestamp(TEST7_TIMESTAMP);
let hash = H256::default();
let signer7 = get_signer(TEST7_SIGNER_PUB);
let shard7 = H256::from_slice(&TEST7_MRENCLAVE);

let block_number = 1;

register_enclave7();

assert_err!(
Sidechain::confirm_imported_sidechain_block(
Origin::signed(signer7.clone()),
shard7,
block_number,
block_number,
hash
),
Error::<Test>::InvalidNextFinalizationCandidateBlockNumber,
);
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, I am happy you added the test.

@gaudenzkessler gaudenzkessler merged commit ee5a5b8 into develop Oct 27, 2022
@gaudenzkessler gaudenzkessler deleted the gk/add_validity_check_to_finalization branch October 27, 2022 14:50
OverOrion pushed a commit that referenced this pull request Nov 11, 2022
* Add validity check to finalization

* adjust test

* adjust benchmark test

Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch>
clangenb pushed a commit that referenced this pull request Nov 15, 2022
* Propose every nth block as finality candidate instead of all the blocks (#93)

Propose every nth block as finality candidate instead of all the blocks


Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch>

* Add validity check to finalization (#111)

* Add validity check to finalization

* adjust test

* adjust benchmark test

Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch>

* fixup! Propose every nth block as finality candidate instead of all the blocks (#93)

Co-authored-by: gaudenzkessler <92718752+gaudenzkessler@users.noreply.github.com>
Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch>
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.

3 participants