I am looking into get_status() function is status_cache.rs. I am wondering how and where roots and ancestors are updated for this check. I suppose there must be some place in the replay stage where they are updated. Please help
1 Answer
You can look at how status_cache
is used in bank.rs
. This cache is shared between all of the banks in the system, which are used by replay.
Here's a line that updates roots: https://github.com/solana-labs/solana/blob/7d286961ba80bd727c62195a32f9cedce0c37882/runtime/src/bank.rs#L3188
-
Thanks, I got it. Another thing is that I think roots are subset of ancestors and dont know why they are both checked [link] (github.com/solana-labs/solana/blob/master/runtime/src/…) , only checking against ancestors would be fine Jan 25 at 13:02
-
I saw your comment on Discord at discord.com/channels/428295358100013066/885976714646290473/… -- I think you might be right, but I don't know the code path well enough. Maybe put in a PR to remove that check and see what happens?– Jon CJan 25 at 13:44