Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Jul 1, 2024
1 parent 094c853 commit 21b05fb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 44 deletions.
86 changes: 43 additions & 43 deletions core/state_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,49 +498,49 @@ func TestProcessVerkle(t *testing.T) {

txCost1 := params.TxGas
txCost2 := params.TxGas
contractCreationCost := intrinsicContractCreationGas + uint64(
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+params.WitnessBranchReadCost+params.WitnessBranchWriteCost+ /* creation */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* creation with value */
739 /* execution costs */)
codeWithExtCodeCopyGas := intrinsicCodeWithExtCodeCopyGas + uint64(
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+params.WitnessBranchReadCost+params.WitnessBranchWriteCost+ /* creation (tx) */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+params.WitnessBranchReadCost+params.WitnessBranchWriteCost+ /* creation (CREATE at pc=0x20) */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* write code hash */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #0 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #1 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #2 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #3 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #4 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #5 */
params.WitnessChunkReadCost+ /* SLOAD in constructor */
params.WitnessChunkWriteCost+ /* SSTORE in constructor */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+params.WitnessBranchReadCost+params.WitnessBranchWriteCost+ /* creation (CREATE at PC=0x121) */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* write code hash */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #0 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #1 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #2 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #3 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #4 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #5 */
params.WitnessChunkReadCost+ /* SLOAD in constructor */
params.WitnessChunkWriteCost+ /* SSTORE in constructor */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* write code hash for tx creation */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #0 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #1 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #2 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #3 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #4 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #5 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #6 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #7 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #8 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #9 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #10 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #11 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #12 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #13 */
params.WitnessChunkReadCost+params.WitnessChunkWriteCost+ /* code chunk #14 */
4844 /* execution costs */)
contractCreationCost := intrinsicContractCreationGas +
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + params.WitnessBranchReadCost + params.WitnessBranchWriteCost + /* creation */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* creation with value */
739 /* execution costs */
codeWithExtCodeCopyGas := intrinsicCodeWithExtCodeCopyGas +
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + params.WitnessBranchReadCost + params.WitnessBranchWriteCost + /* creation (tx) */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + params.WitnessBranchReadCost + params.WitnessBranchWriteCost + /* creation (CREATE at pc=0x20) */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* write code hash */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #0 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #1 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #2 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #3 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #4 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #5 */
params.WitnessChunkReadCost + /* SLOAD in constructor */
params.WitnessChunkWriteCost + /* SSTORE in constructor */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + params.WitnessBranchReadCost + params.WitnessBranchWriteCost + /* creation (CREATE at PC=0x121) */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* write code hash */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #0 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #1 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #2 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #3 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #4 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #5 */
params.WitnessChunkReadCost + /* SLOAD in constructor */
params.WitnessChunkWriteCost + /* SSTORE in constructor */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* write code hash for tx creation */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #0 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #1 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #2 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #3 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #4 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #5 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #6 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #7 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #8 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #9 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #10 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #11 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #12 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #13 */
params.WitnessChunkReadCost + params.WitnessChunkWriteCost + /* code chunk #14 */
4844 /* execution costs */
blockGasUsagesExpected := []uint64{
txCost1*2 + txCost2,
txCost1*2 + txCost2 + contractCreationCost + codeWithExtCodeCopyGas,
Expand Down
1 change: 0 additions & 1 deletion trie/verkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ func (t *VerkleTrie) UpdateContractCode(addr common.Address, codeHash common.Has
}
values[groupOffset] = chunks[i : i+32]


if groupOffset == 255 || len(chunks)-i <= 32 {
err = t.UpdateStem(key[:31], values)

Expand Down

0 comments on commit 21b05fb

Please sign in to comment.