Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 200
fix: broadcast HeadChange::Revert(Tipset) in set_heaviest_tipset#6732
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3888ede
fix: broadcast HeadChange::Revert(Tipset) in set_heaviest_tipset
hanabi1224 4c59008
resolve AI comments
hanabi1224 b26e0c2
resolve comments
hanabi1224 a758183
resolve comments
hanabi1224 b7c0d19
fix
hanabi1224 29dccb6
Merge remote-tracking branch 'origin/main' into hm/head-change-revert
hanabi1224 20df24c
fix
hanabi1224 d753d31
fix
hanabi1224 c6b0c0c
fix
hanabi1224 843febe
fix
hanabi1224 279d588
checks for chain_get_path
hanabi1224 93510e1
refactor
hanabi1224 8997af4
Merge remote-tracking branch 'origin/main' into hm/head-change-revert
hanabi1224 5594a0d
promote get_chain_path failure log level
hanabi1224 61db9e7
Merge remote-tracking branch 'origin/main' into hm/head-change-revert
hanabi1224 38c8eb4
Merge remote-tracking branch 'origin/main' into hm/head-change-revert
hanabi1224 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -226,15 +226,25 @@ where | ||
| let mut repub = false; | ||
| let mut rmsgs: HashMap<Address, HashMap<u64, SignedMessage>> = HashMap::new(); | ||
| for ts in revert { | ||
| let pts = api.load_tipset(ts.parents())?; | ||
| let Ok(pts) = api.load_tipset(ts.parents()) else { | ||
| tracing::error!("error loading reverted tipset parent"); | ||
hanabi1224 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| continue; | ||
| }; | ||
| *cur_tipset.write() = pts; | ||
| let mut msgs: Vec<SignedMessage> = Vec::new(); | ||
| for block in ts.block_headers() { | ||
| let (umsg, smsgs) = api.messages_for_block(block)?; | ||
| let Ok((umsg, smsgs)) = api.messages_for_block(block) else { | ||
| tracing::error!("error retrieving messages for reverted block"); | ||
| continue; | ||
| }; | ||
| msgs.extend(smsgs); | ||
| for msg in umsg { | ||
| let smsg = recover_sig(bls_sig_cache, msg)?; | ||
| let msg_cid = msg.cid(); | ||
| let Ok(smsg) = recover_sig(bls_sig_cache, msg) else { | ||
| tracing::debug!("could not recover signature for bls message {}", msg_cid); | ||
| continue; | ||
| }; | ||
| msgs.push(smsg) | ||
| } | ||
| } | ||
| @@ -246,7 +256,10 @@ where | ||
| for ts in apply { | ||
| for b in ts.block_headers() { | ||
| let (msgs, smsgs) = api.messages_for_block(b)?; | ||
| let Ok((msgs, smsgs)) = api.messages_for_block(b) else { | ||
| tracing::error!("error retrieving messages for block"); | ||
| continue; | ||
| }; | ||
| for msg in smsgs { | ||
| remove_from_selected_msgs( | ||
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.