-
Notifications
You must be signed in to change notification settings - Fork 151
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
Populate timestamp field of Block #3733
base: nick/timestamp-on-block
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. This stack of pull requests is managed by Graphite. Learn more about stacking. Join @nick-mobilecoin and the rest of your teammates on Graphite |
8423ec7
to
f3d2171
Compare
The approach in #3711 didn't pan 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.
Overall this LGTM but there's an issue with the nonce de-duping stuff in the mint/mint config txs, and maybe a need to allow for timestamps in the near future. I made comments with more details in the relevant parts.
After those are addressed I'll take a second pass at this since while on the surface this is fairly easy to follow, I do want to increase the chances of not missing anything since this does change the blockchain in a meaningful way.
Thanks for iterating on this!
84dd8db
to
f618259
Compare
f3d2171
to
5a107ab
Compare
When values are proposed to SCP, a timestamp is provided with the proposed value. These timestamps are validated and consolidated to populate the timestamp field of the `Block`.
Previously timestamp validation would fail if the timestamp was in the future, now a 3 second window is allowed to occur to account for skew between consensus nodes.
Previously MintTx and MintConfigTx would deduplicate by the entire value of the structure. Now only the nonce and token id are looked at for deduplication. This prevents transactions with the same nonce and token id, but with a different value.
881e5a9
to
55e6939
Compare
d95e1d2
to
59624f8
Compare
Previously a timestamp in SCP would be marked invalid if it exceeded 30 seconds. This posed a problem if multiple nodes were flooded with transactions that exceeded their capacity, and the nodes were stalled enough such that it took more than 30 seconds to get the value + timestamp to a quorum. Now timestamps are only ensured to not be in the future and to be increasing from the last block's timestamp.
@eranrund I believe I've addressed the timestamp locking up consensus in 6bcb229 The failure case: The slam test threw enough transactions at a node to exceed the PENDING_LIMIT of transactions. We could increase the age out time to something like 5 or 10 minutes, to reduce the likely hood of this event but still allow manual restarts. However, in general I'm thinking we shouldn't allow values to become invalid outside of the blockchain moving forward. |
I'm currently looking at the failure on https://github.com/mobilecoinfoundation/mobilecoin/actions/runs/7049871021/job/19189327703 |
Thanks for digging into this - this makes sense. I think removing that check is acceptable. The current CI failure is also an interesting one but since it's fog I somehow doubt its related to the changes in this PR. I've re-ran it to see what happens. |
Ci failures, similar issues have happened
|
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.
LGTM, but we should probably wait for an accepted MCIP before merging.
Thanks for working through this!
Co-authored-by: Eran Rundstein <eran@rundste.in>
When values are proposed to SCP, a timestamp is provided with the
proposed value. These timestamps are validated and consolidated to
populate the timestamp field of the
Block
.