-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix(txSkip): address collisions #1510
fix(txSkip): address collisions #1510
Conversation
Signed-off-by: F Bojarski <ceciestunepoubelle@protonmail.ch>
Signed-off-by: F Bojarski <ceciestunepoubelle@protonmail.ch>
Signed-off-by: F Bojarski <ceciestunepoubelle@protonmail.ch>
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.
no real change in this file, just added final
, moved some function to TransactionProcessingMetadata
and factorize the last transaction fragment.
…ss-collision-shenanigans-into-account
…ss-collision-shenanigans-into-account
testing/src/main/java/net/consensys/linea/testing/ToyExecutionEnvironmentV2.java
Outdated
Show resolved
Hide resolved
Signed-off-by: F Bojarski <ceciestunepoubelle@protonmail.ch>
…ss-collision-shenanigans-into-account
} | ||
|
||
@Test | ||
void senderIsCoinbaseIsReceiver() { |
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.
One test to rule them all 👑
“It is a strange fate that we should suffer so much fear and doubt over so small a thing … such a little thing.”
.zkTracerValidator(zkTracer -> {}) | ||
.build() | ||
.run(); | ||
} |
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.
Does this test succeed ? We had a regression in Besu with @ahamlat / @Gabriel-Trintinalia / @lu-pinto's fix being undone in a recent commit, which may make this test fail now.
DomSubStampsSubFragment.standardDomSubStamps(hub.stamp(), 2)); | ||
|
||
this.addFragments(firstAccountFragment, secondAccountFragment, thirdAccountFragment); | ||
} |
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 will really need account consistency constraints to test this properly 😅.
AccountSnapshot.canonical(hub, world, recipientAccountSnapshotBefore.address()); | ||
|
||
final AccountSnapshot coinbaseAccountSnapshotAfter = | ||
AccountSnapshot.canonical(hub, world, coinbaseAccountSnapshotBefore.address()); |
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 noticing that in the old version we were copying over the warmths. I don't have the spec in mind, and I doubt that it fundamentally matters. But the question remains: is the fact that there is no mention of warmths an oversight ?
The spec says that one should keep warmths for TX_SKIP
as they are. I wonder what that would mean e.g. if
- sender is a precompile (can we even test this ? Or would we need to produce a signature for the (unknown) private key of a precompile) ?
- coinbase is a precompile (those are warm by default)
N.B. Recipients may not be precompiles.
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 don't think IRL it's possible to have sender / coinbase that is a precompile ...
In the spec, we only constrain the warmth to remains constant, thus it's better to be hot -> hot as it could be warmed (being on the accessList , or so). So when taking teh snapshot, better to turn on the warmth all the time.
.accountFragment() | ||
.make( | ||
senderSnapshotBeforeFinalization, | ||
coinbaseSnapshotAfterFinalization, |
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.
This should indeed work
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 need some more testing. In particular the case(s?) I laid out, where the coinbase is a precompile. We may find issues wrt its warmth.
Also if we don't have them yet we should add tests for TX_SKIP with trivial deployments. We can play the same games of
|
No description provided.