-
Notifications
You must be signed in to change notification settings - Fork 12
Remove code related to reorganization #106
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
Conversation
a41f868 to
d322548
Compare
d322548 to
e60e4d3
Compare
sgkim126
left a comment
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.
CodeChain don't have to handle such cases anymore. -> Foundry doesn't have to handle such cases anymore. in the first commit message
| /// External transaction received from network | ||
| External, | ||
| /// Transaction from retracted blocks | ||
| RetractedBlock, |
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'm not sure about it.
What happened for the transactions in the rejected proposal block?
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.
Thank you, this change is not desirable. Retracted transactions by one-block retraction due to consensus failure (or by randomized-leader-election) should be considered.
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.
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.
There are two methods removing transactions from the mem pool. One is remove and the other is remove_old. There is only one explicit call remove which removes invalid transactions(txs from malicious users or verification failed txs). Also there is one explicit call remove_old in chain_new_blocks which removes old (the norm of old here is the accounts' sequences in txs are old) transactions.
This old transactions are determined by chain's accounts' sequences in the latest block. The latest block fetches best block so the transactions in blocks rejected by consensus will not be removed from the mem pool.
In tendermint consensus algorithm branch is not allowed so that Foundry don't have to handle such cases anymore.
e60e4d3 to
e39dc6f
Compare
|
@majecty Would you review tendermint related parts? |
majecty
left a comment
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.
Please check how transactions are managed by the Memory pool when creating a proposal block and making a proposal block as the best block.
ImportRoute no longer allows retracted blocks or headers
Previously, optional types are needed to handle retracted txs by distinguishing them from enacted txs. Now, it is removed.
e39dc6f to
b3d80fd
Compare
|
I have a question about the commit titled "No longer consider retracted txs in db". |
|
@sgkim126 We don't need to consider the proposal block. |
sgkim126
left a comment
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.
It closes #31