Skip to content

Commit

Permalink
params: move verkle params to their own file (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet authored Jun 29, 2023
1 parent a8dd024 commit e8ace55
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
7 changes: 0 additions & 7 deletions params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,6 @@ const (
// up to half the consumed gas could be refunded. Redefined as 1/5th in EIP-3529
RefundQuotient uint64 = 2
RefundQuotientEIP3529 uint64 = 5

// Verkle tree EIP: costs associated to witness accesses
WitnessBranchReadCost = uint64(1900)
WitnessChunkReadCost = uint64(200)
WitnessBranchWriteCost = uint64(3000)
WitnessChunkWriteCost = uint64(500)
WitnessChunkFillCost = uint64(6200)
)

// Gas discount table for BLS12-381 G1 and G2 multi exponentiation operations
Expand Down
26 changes: 26 additions & 0 deletions params/verkle_params.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2023 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

package params

// Verkle tree EIP: costs associated to witness accesses
var (
WitnessBranchReadCost uint64 = 1900
WitnessChunkReadCost uint64 = 200
WitnessBranchWriteCost uint64 = 3000
WitnessChunkWriteCost uint64 = 500
WitnessChunkFillCost uint64 = 6200
)

0 comments on commit e8ace55

Please sign in to comment.