-
Notifications
You must be signed in to change notification settings - Fork 700
Chore/remove affirmation map from chainscoordinator #6332
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
base: develop
Are you sure you want to change the base?
Chore/remove affirmation map from chainscoordinator #6332
Conversation
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
…irmation_maps_at_height, and find_valid_sortitions Signed-off-by: Jacinta Ferrant <[email protected]>
…ain_block Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
…k_compatible_with_affirmation_map Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
… into chore/remove-affirmation-map-from-chainscoordinator
@@ -1254,7 +1254,7 @@ fn test_inv_sync_start_reward_cycle() { | |||
let block_scan_start = peer_1 | |||
.network | |||
.get_block_scan_start(peer_1.sortdb.as_ref().unwrap()); | |||
assert_eq!(block_scan_start, 7); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is correct? But not 100% sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so. The change to get_block_scan_start
appears to have introduced a bug or exposed buggy behavior elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm But why should it return 7? The only reason it returned 7 before was when it searched for the heaviest affirmation map it showed the lower 7...now it doesn't exist so it searches for the reward cycle minus inv_reward_cycles which in this case means 9 - 1 which is 8. I am not convinced that the test_peer setup is correct now with affirmation maps being gone, but I logically cannot reason out why this would be anything but 8..
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
…dless of epoch Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
… into chore/remove-affirmation-map-from-chainscoordinator
Signed-off-by: Jacinta Ferrant <[email protected]>
…ng out CI Signed-off-by: Jacinta Ferrant <[email protected]>
|
||
// affirmation maps are compatible, so just resume scanning off of wherever we are at the | ||
// tip. | ||
// Resume scanning off of wherever we are at the tip. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes net::tests::inv::nakamoto::test_nakamoto_inv_sync_across_epoch_ to infinitely loop as its calls to inv_getpoxinv_begin always returns reward cycle 7 as the start, but it seems to need reward cycle 2. Not yet figured out why. I assume it is a problem with how the test itself is written but struggling to fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that test, can you show me what the output of these info!
lines are?
info!(
"Epoch 2.x state machine: Peer 1: {inv_1_count}, Peer 2: {inv_2_count} (total {num_epoch2_blocks})"
);
info!(
"Nakamoto state machine: Peer 1: {highest_rc_1}, Peer 2: {highest_rc_2} (total {total_rcs})"
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nm I see it in the test logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you confirm that InvSync::sync_inventories_epoch2x()
is even being called? The fact that inv_1_count
and inv_2_count
are both zero means that neither peer has done a round of an epoch2x inventory syncs. It's not indicated by the test logs I'm afraid, since it would require debug-logs to figure out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I confirmed that it is called. See many repeats of the following:
DEBG [1755104776.014222] [stackslib/src/net/inv/epoch2x.rs:2275] [net::tests::inv::nakamoto::test_nakamoto_inv_sync_across_epoch_change] local::60615: Inventory state has 1 block stats tracked on connections {4}
DEBG [1755104776.015142] [stackslib/src/net/inv/epoch2x.rs:2275] [net::tests::inv::nakamoto::test_nakamoto_inv_sync_across_epoch_change] local::60617::pub=127.0.0.1:60617: Inventory state has 1 block stats tracked on connections {3}
… into chore/remove-affirmation-map-from-chainscoordinator
…n affirmation map flow around failure to announce blocks Signed-off-by: Jacinta Ferrant <[email protected]>
f69b924
to
3bf47dd
Compare
Signed-off-by: Jacinta Ferrant <[email protected]>
…nchor_v205 Signed-off-by: Jacinta Ferrant <[email protected]>
…it_affirmation Signed-off-by: Jacinta Ferrant <[email protected]>
…cle as the sync start point, and remove a now-defunct test (PoX bitvectors are always 1's, so there is no need to test for the case when there's a 0)
chore: fix epoch2x inv sync
Signed-off-by: Jacinta Ferrant <[email protected]>
… into chore/remove-affirmation-map-from-chainscoordinator
Partially closes #6314
This PR focuses on just removing affirmation code paths from the ChainsCoordinator specifically. A follow on PR will work on removing affirmation.rs entirely and removing DB affirmation map related tables/functions.