Skip to content

Commit

Permalink
blockhash: charge warm costs in witness (#529)
Browse files Browse the repository at this point in the history
* blockhash: charge witness warm costs

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* ci: test alpha release

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
  • Loading branch information
jsign authored Dec 10, 2024
1 parent 4e66b2f commit f0d4c32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stable-spec-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
FIXTURES_TAG: "verkle@v0.0.8"
FIXTURES_TAG: "verkle@v0.0.9-alpha-1"

jobs:
setup:
Expand Down
2 changes: 1 addition & 1 deletion core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func getBlockHashFromContract(number uint64, statedb StateDB, witness *state.Acc
ringIndex := number % params.Eip2935BlockHashHistorySize
var pnum common.Hash
binary.BigEndian.PutUint64(pnum[24:], ringIndex)
statelessGas := witness.TouchSlotAndChargeGas(params.HistoryStorageAddress[:], pnum, false, availableGas, false)
statelessGas := witness.TouchSlotAndChargeGas(params.HistoryStorageAddress[:], pnum, false, availableGas, true)
return statedb.GetState(params.HistoryStorageAddress, pnum), statelessGas
}

Expand Down

0 comments on commit f0d4c32

Please sign in to comment.