-
Notifications
You must be signed in to change notification settings - Fork 664
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
feat(Chain): move check_refcount_map into Store Validator + caching Tx Refcounts while GCing #2937
Conversation
b0d8921
to
6b8cd8e
Compare
12a8789
to
478da5c
Compare
* feat(Store Validator): State Header validation for State Parts * state_header_block_exists * get_num_state_parts
let mut refcount = self.chain_store.get_tx_refcount(&tx.get_hash())?; | ||
refcount += 1; | ||
store_update.set_ser(ColTransactionRefCount, tx.get_hash().as_ref(), &refcount)?; |
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.
Do we ensure that this does not lead us to a race condition?
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.
We cannot increase and decrease Tx Refcount in one store update operation. While increasing, we cannot add same Tx twice. There is also a comment in finalize()
method explaining this.
sanity/epoch_switches.py
TEST PLAN
CI + custom Nightly