Documentation
¶
Overview ¶
Package config supports configuration of the Flow Rosetta server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
BalanceValidationInterval time.Duration
Cache bool
ConstructionAccessNodes access.Pool
DataAccessNodes access.Pool
Contracts *Contracts
DataDir string
MaxBackoffInterval time.Duration
Mode string
Network string
Originators []string
Port uint16
PurgeProxyAccounts bool
ResyncFrom uint64
SkipBlocks map[flow.Identifier]struct{}
SporkSealTolerance uint64
Sporks []*Spork
UseConsensusFollwer bool
Workers uint
}
Chain represents the definition of a Flow chain like mainnet and testnet.
func Init ¶
Init reads the given config file, decodes the JSON config, validates it, and returns the initialized config.
func (*Chain) FirstSpork ¶
FirstSpork returns the config for the first spork in the chain.
func (*Chain) IsProxyContractDeployed ¶
IsProxyContractDeployed returns whether a deployed Proxy contract has been configured.
func (*Chain) LatestSpork ¶
LatestSpork returns the config for the latest spork in the chain.
type Consensus ¶
type Consensus struct {
DisableSignatureCheck bool `json:"disable_signature_check"`
RootProtocolStateURL string `json:"root_protocol_state_url"`
RootProtocolStateSignatureURL string `json:"root_protocol_state_signature_url"`
SeedNodes []SeedNode `json:"seed_nodes"`
SigningKey string `json:"signing_key"`
}
Consensus defines the metadata needed to initialize a consensus follower for a live spork.
type Contracts ¶
type Contracts struct {
FlowFees string `json:"flow_fees"`
FlowToken string `json:"flow_token"`
FungibleToken string `json:"fungible_token"`
FlowColdStorageProxy string `json:"flow_cold_storage_proxy"`
}
Contracts defines the chain-specific addresses for various core contracts.