github.com/codingfuture/orig-energi3@v0.8.4/energi/params/consensus.go (about)

     1  // Copyright 2019 The Energi Core Authors
     2  // This file is part of the Energi Core library.
     3  //
     4  // The Energi Core library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The Energi Core library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the Energi Core library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  package params
    18  
    19  type ctxKey string
    20  
    21  const (
    22  	MaturityPeriod    uint64 = 60 * 60
    23  	AverageTimeBlocks uint64 = 60
    24  	TargetBlockGap    uint64 = 60
    25  	MinBlockGap       uint64 = 30
    26  	MaxFutureGap      uint64 = 3
    27  	TargetPeriodGap   uint64 = AverageTimeBlocks * TargetBlockGap
    28  
    29  	// DoS protection
    30  	OldForkPeriod uint64 = 15 * 60
    31  	StakeThrottle uint64 = 60
    32  
    33  	UnlimitedGas uint64 = (1 << 40)
    34  
    35  	MasternodeCallGas uint64 = 1000000
    36  
    37  	// MaxCheckpointVoteBlockAge defines the period in blocks count from the time
    38  	// the checkpoint signer account proposes a checkpoint in which its voting
    39  	// is permitted.
    40  	MaxCheckpointVoteBlockAge = 1440
    41  
    42  	// GeneralProxyCtxKey is used to pass the governed proxy address hash to
    43  	// the filter logs interface.
    44  	GeneralProxyCtxKey = ctxKey("governedProxyAddressHash")
    45  )