2020-03-25 15:30:21 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
2020-06-14 07:34:50 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
2020-03-25 15:30:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ProtocolConfiguration represents the protocol config.
|
|
|
|
type (
|
|
|
|
ProtocolConfiguration struct {
|
2020-06-16 11:59:09 +00:00
|
|
|
Magic netmode.Magic `yaml:"Magic"`
|
|
|
|
MemPoolSize int `yaml:"MemPoolSize"`
|
2020-11-27 10:55:48 +00:00
|
|
|
// P2PNotaryRequestPayloadPoolSize specifies the memory pool size for P2PNotaryRequestPayloads.
|
|
|
|
// It is valid only if P2PSigExtensions are enabled.
|
|
|
|
P2PNotaryRequestPayloadPoolSize int `yaml:"P2PNotaryRequestPayloadPoolSize"`
|
2020-10-21 13:58:41 +00:00
|
|
|
// KeepOnlyLatestState specifies if MPT should only store latest state.
|
|
|
|
// If true, DB size will be smaller, but older roots won't be accessible.
|
|
|
|
// This value should remain the same for the same database.
|
|
|
|
KeepOnlyLatestState bool `yaml:"KeepOnlyLatestState"`
|
2020-11-24 09:07:58 +00:00
|
|
|
// RemoveUntraceableBlocks specifies if old blocks should be removed.
|
|
|
|
RemoveUntraceableBlocks bool `yaml:"RemoveUntraceableBlocks"`
|
2021-03-15 10:00:04 +00:00
|
|
|
// MaxBlockSize is the maximum block size in bytes.
|
|
|
|
MaxBlockSize uint32 `yaml:"MaxBlockSize"`
|
2021-03-15 10:51:07 +00:00
|
|
|
// MaxBlockSystemFee is the maximum overall system fee per block.
|
|
|
|
MaxBlockSystemFee int64 `yaml:"MaxBlockSystemFee"`
|
2020-11-05 19:01:12 +00:00
|
|
|
// MaxTraceableBlocks is the length of the chain accessible to smart contracts.
|
|
|
|
MaxTraceableBlocks uint32 `yaml:"MaxTraceableBlocks"`
|
2021-02-17 15:22:57 +00:00
|
|
|
// MaxTransactionsPerBlock is the maximum amount of transactions per block.
|
|
|
|
MaxTransactionsPerBlock uint16 `yaml:"MaxTransactionsPerBlock"`
|
2021-05-17 08:07:08 +00:00
|
|
|
// MaxValidUntilBlockIncrement is the upper increment size of blockchain height in blocks
|
|
|
|
// exceeding that a transaction should fail validation. It is set to estimated daily number
|
|
|
|
// of blocks with 15s interval.
|
|
|
|
MaxValidUntilBlockIncrement uint32 `yaml:"MaxValidUntilBlockIncrement"`
|
2021-03-11 11:39:51 +00:00
|
|
|
// NativeUpdateHistories is the list of histories of native contracts updates.
|
|
|
|
NativeUpdateHistories map[string][]uint32 `yaml:"NativeActivations"`
|
2020-11-27 10:55:48 +00:00
|
|
|
// P2PSigExtensions enables additional signature-related logic.
|
2020-10-14 16:07:16 +00:00
|
|
|
P2PSigExtensions bool `yaml:"P2PSigExtensions"`
|
2020-10-15 10:06:22 +00:00
|
|
|
// ReservedAttributes allows to have reserved attributes range for experimental or private purposes.
|
|
|
|
ReservedAttributes bool `yaml:"ReservedAttributes"`
|
2020-03-25 15:30:21 +00:00
|
|
|
// SaveStorageBatch enables storage batch saving before every persist.
|
2020-08-03 14:07:24 +00:00
|
|
|
SaveStorageBatch bool `yaml:"SaveStorageBatch"`
|
|
|
|
SecondsPerBlock int `yaml:"SecondsPerBlock"`
|
|
|
|
SeedList []string `yaml:"SeedList"`
|
|
|
|
StandbyCommittee []string `yaml:"StandbyCommittee"`
|
2020-11-17 12:57:50 +00:00
|
|
|
// StateRooInHeader enables storing state root in block header.
|
|
|
|
StateRootInHeader bool `yaml:"StateRootInHeader"`
|
|
|
|
ValidatorsCount int `yaml:"ValidatorsCount"`
|
2020-03-25 15:30:21 +00:00
|
|
|
// Whether to verify received blocks.
|
|
|
|
VerifyBlocks bool `yaml:"VerifyBlocks"`
|
|
|
|
// Whether to verify transactions in received blocks.
|
|
|
|
VerifyTransactions bool `yaml:"VerifyTransactions"`
|
|
|
|
}
|
|
|
|
)
|