mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
4e7cee4e12
It directly affects node security and the default here MUST BE the safe choice which is to do the verification. Otherwise it's just dangerous, absent any VerifyBlocks configuration we'll get an insecure node. This option is not supposed to be frequently used and it doesn't affect the ability to process blocks, so breaking compatibility (in a safe manner) should be OK here.
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
package config
|
|
|
|
// Ledger contains core node-specific settings that are not
|
|
// a part of the ProtocolConfiguration (which is common for every node on the
|
|
// network).
|
|
type Ledger struct {
|
|
// GarbageCollectionPeriod sets the number of blocks to wait before
|
|
// starting the next MPT garbage collection cycle when RemoveUntraceableBlocks
|
|
// option is used.
|
|
GarbageCollectionPeriod uint32 `yaml:"GarbageCollectionPeriod"`
|
|
// KeepOnlyLatestState specifies if MPT should only store the 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"`
|
|
// RemoveUntraceableBlocks specifies if old data should be removed.
|
|
RemoveUntraceableBlocks bool `yaml:"RemoveUntraceableBlocks"`
|
|
// SaveStorageBatch enables storage batch saving before every persist.
|
|
SaveStorageBatch bool `yaml:"SaveStorageBatch"`
|
|
// SkipBlockVerification allows to disable verification of received
|
|
// blocks (including cryptographic checks).
|
|
SkipBlockVerification bool `yaml:"SkipBlockVerification"`
|
|
}
|
|
|
|
// Blockchain is a set of settings for core.Blockchain to use, it includes protocol
|
|
// settings and local node-specific ones.
|
|
type Blockchain struct {
|
|
ProtocolConfiguration
|
|
Ledger
|
|
}
|