Skip to content
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

remove some nondeterminism in driver.md #22

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Conversation

dwightguth
Copy link

There are a few rules in driver.md that conflict with each other or which conflict with rules in state-utils.md. It is pretty straightforward to modify the semantics so that this is no longer the case. We do this in order to test that the EVM semantics is actually 100% deterministic (which it is).

@dwightguth dwightguth marked this pull request as ready for review November 27, 2024 22:31
@dwightguth dwightguth requested a review from sskeirik November 27, 2024 22:31
@@ -547,7 +541,6 @@ Here we check the other post-conditions associated with an EVM test.

rule <k> check TESTID : { "transactions" : TRANSACTIONS } => check "transactions" : TRANSACTIONS ~> failure TESTID ... </k>
// ---------------------------------------------------------------------------------------------------------------------------
rule <k> check "transactions" : [ .JSONs ] => .K ... </k> <txOrder> .List </txOrder>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superceded by this rule: rule <k> check DATA : [ .JSONs ] => .K ... </k> requires DATA =/=String "ommerHeaders"

@@ -536,9 +533,6 @@ Here we check the other post-conditions associated with an EVM test.

rule check TESTID : { "genesisBlockHeader" : BLOCKHEADER } => check "genesisBlockHeader" : BLOCKHEADER ~> failure TESTID
// ------------------------------------------------------------------------------------------------------------------------
rule <k> check "genesisBlockHeader" : { KEY : VALUE , REST } => check "genesisBlockHeader" : { KEY : VALUE } ~> check "genesisBlockHeader" : { REST } ... </k>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superceded by this rule: rule <k> check DATA : { (KEY:String) : VALUE , REST } => check DATA : { KEY : VALUE } ~> check DATA : { REST } ... </k> requires REST =/=K .JSONs andBool notBool DATA in (SetItem("callcreates") SetItem("transactions"))

@@ -473,9 +473,6 @@ Here we check the other post-conditions associated with an EVM test.

rule check TESTID : { "blockHeader" : BLOCKHEADER } => check "blockHeader" : BLOCKHEADER ~> failure TESTID
// ----------------------------------------------------------------------------------------------------------
rule <k> check "blockHeader" : { KEY : VALUE , REST } => check "blockHeader" : { KEY : VALUE } ~> check "blockHeader" : { REST } ... </k>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superceded by this rule: rule <k> check DATA : { (KEY:String) : VALUE , REST } => check DATA : { KEY : VALUE } ~> check DATA : { REST } ... </k> requires REST =/=K .JSONs andBool notBool DATA in (SetItem("callcreates") SetItem("transactions"))

Copy link

@sskeirik sskeirik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Approved!

One minor note: the rule deleted on line 476 was clearly intended to constrain the test configuration in a way that the replacement rule does not.

That said, I don't know if the deleted rule ever effectively constrained anything --- due to its overlap with the replacement rule --- which does not have the constraint.

For completeness, the intended constraint was:

The number of JSON objects in the transactions array in the JSON blob should be the same as the number of list elements in the <txOrder> cell.

@dwightguth dwightguth merged commit 54dfbc0 into master Dec 2, 2024
4 checks passed
@dwightguth dwightguth deleted the remove-duplicates branch December 2, 2024 19:26
Robertorosmaninho pushed a commit that referenced this pull request Jan 28, 2025
There are a few rules in driver.md that conflict with each other or
which conflict with rules in state-utils.md. It is pretty
straightforward to modify the semantics so that this is no longer the
case. We do this in order to test that the EVM semantics is actually
100% deterministic (which it is).
Robertorosmaninho pushed a commit that referenced this pull request Jan 31, 2025
There are a few rules in driver.md that conflict with each other or
which conflict with rules in state-utils.md. It is pretty
straightforward to modify the semantics so that this is no longer the
case. We do this in order to test that the EVM semantics is actually
100% deterministic (which it is).
Robertorosmaninho pushed a commit that referenced this pull request Jan 31, 2025
There are a few rules in driver.md that conflict with each other or
which conflict with rules in state-utils.md. It is pretty
straightforward to modify the semantics so that this is no longer the
case. We do this in order to test that the EVM semantics is actually
100% deterministic (which it is).
Robertorosmaninho pushed a commit that referenced this pull request Jan 31, 2025
There are a few rules in driver.md that conflict with each other or
which conflict with rules in state-utils.md. It is pretty
straightforward to modify the semantics so that this is no longer the
case. We do this in order to test that the EVM semantics is actually
100% deterministic (which it is).
Robertorosmaninho pushed a commit that referenced this pull request Jan 31, 2025
There are a few rules in driver.md that conflict with each other or
which conflict with rules in state-utils.md. It is pretty
straightforward to modify the semantics so that this is no longer the
case. We do this in order to test that the EVM semantics is actually
100% deterministic (which it is).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants