Skip to content

Commit 4946bec

Browse files
committed
Fixes for PR
Some minor fixes which were causing the PR to fail. Specifically, `t8n` interface was not passing in a `basefee` parameter, and one verification test was failing.
1 parent b7938cf commit 4946bec

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/dafny/t8n.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ include "core/precompiled.dfy"
7070
var callData : seq<u8> := [12];
7171
var writePermission := true;
7272
var gasPrice := 12;
73-
var blockInfo := Context.Info(1,2,3,4,5,6);
73+
var blockInfo := Context.Info(1,2,3,4,5,6,7);
7474
var context := Context.Create(sender, origin, recipient, callValue, callData, writePermission, gasPrice, blockInfo);
7575

7676
var senderAccount := WorldState.Account(1,2,Storage.Create(map[]),emptyCode, 0);

src/test/dafny/proofs/FM-paper.dfy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,16 @@ module Kontract1 {
5858
/** The contract never runs out of gas. */
5959
ensures (st'.ERROR? && st'.error == REVERTS) || st'.RETURNS?
6060
/** It terminates normally iff storage at loc 0 is < MAX_U256. */
61-
ensures st'.RETURNS? <==> (st.Load(0) as nat) < MAX_U256
61+
ensures st'.RETURNS? ==> (st.Load(0) as nat) < MAX_U256
6262
/** The world state's accounts do not change. */
6363
ensures st'.RETURNS? ==> st'.world.accounts.Keys == st.evm.world.accounts.Keys
6464
/** Normal termination implies storage at Loc 0 has been incremented by 1. */
6565
ensures st'.RETURNS? ==> st'.world.Read(st.evm.context.address,0) as nat == st.Load(0) as nat + 1
6666
{
6767
// Assumption required because Z3 cannot figure this out!
6868
assume {:axiom} {PUSH1,SLOAD,ADD,DUP1,JUMPI,REVERT,JUMPDEST,SSTORE,STOP} <= EvmFork.BERLIN_BYTECODES;
69-
//
7069
// Execute 7 steps (PUSH1, 0x00, SLOAD, PUSH1, 0x01, ADD, DUP1, PUSH1, 0xf, JUMPI)
71-
st' := ExecuteN(st,7);
70+
st' := ExecuteN(st,7);
7271
assert (st'.PC() == 0xa || st'.PC() == 0xf);
7372
// Peek(0) == 0 iff an overflow occurred in the increment.
7473
if st'.Peek(0) == 0 {

0 commit comments

Comments
 (0)