Documentation
¶
Index ¶
- Constants
- type BaronApp
- func (app *BaronApp) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
- func (app *BaronApp) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx
- func (app *BaronApp) Info(req types.RequestInfo) types.ResponseInfo
- func (app *BaronApp) InitChain(req types.RequestInitChain) types.ResponseInitChain
- func (app *BaronApp) PrepareProposal(req types.RequestPrepareProposal) types.ResponsePrepareProposal
- type Config
- type SnapshotMetadata
- type SnapshotStore
- type State
- type StateConfig
- type ValidatorMap
Constants ¶
const ( AppVersion = 1 DefaultKeyType = "ed25519" DefaultBlocksKeep = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaronApp ¶
type BaronApp struct { types.BaseApplication // contains filtered or unexported fields }
BaronApp represents the Baron Chain ABCI application
func NewBaronApp ¶
NewBaronApp creates a new Baron Chain application instance
func (*BaronApp) CheckTx ¶
func (app *BaronApp) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
CheckTx validates a transaction before adding it to the mempool
func (*BaronApp) DeliverTx ¶
func (app *BaronApp) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx
DeliverTx executes a transaction in the blockchain
func (*BaronApp) Info ¶
func (app *BaronApp) Info(req types.RequestInfo) types.ResponseInfo
Info implements ABCI interface
func (*BaronApp) InitChain ¶
func (app *BaronApp) InitChain(req types.RequestInitChain) types.ResponseInitChain
InitChain initializes the blockchain with validators and initial app state
func (*BaronApp) PrepareProposal ¶
func (app *BaronApp) PrepareProposal(req types.RequestPrepareProposal) types.ResponsePrepareProposal
PrepareProposal handles block proposal preparation
type Config ¶
type Config struct { DataDir string `toml:"data_dir"` SnapshotInterval uint64 `toml:"snapshot_interval"` RetainBlocks uint64 `toml:"retain_blocks"` KeyType string `toml:"key_type"` PersistInterval uint64 `toml:"persist_interval"` ValidatorUpdates ValidatorMap `toml:"validator_updates"` ProposalDelay time.Duration `toml:"proposal_delay"` ProcessingDelay time.Duration `toml:"processing_delay"` TransactionDelay time.Duration `toml:"transaction_delay"` }
Config defines Baron Chain application configuration
type SnapshotMetadata ¶
type SnapshotMetadata struct { Height uint64 `json:"height"` Format uint32 `json:"format"` Hash []byte `json:"hash"` Chunks uint32 `json:"chunks"` Timestamp int64 `json:"timestamp"` Version string `json:"version"` }
SnapshotMetadata represents snapshot metadata stored on disk
type SnapshotStore ¶
SnapshotStore manages state sync snapshots for Baron Chain
func NewSnapshotStore ¶
func NewSnapshotStore(dir string) (*SnapshotStore, error)
NewSnapshotStore creates a new snapshot store instance
func (*SnapshotStore) Create ¶
func (s *SnapshotStore) Create(state *State) (types.Snapshot, error)
Create creates a new snapshot of the current state
type State ¶
type State struct { sync.RWMutex Height uint64 `json:"height"` Values map[string]string `json:"values"` Hash []byte `json:"hash"` Version string `json:"version"` // contains filtered or unexported fields }
State represents Baron Chain's application state
func NewState ¶
func NewState(cfg *StateConfig) (*State, error)
NewState creates a new Baron Chain state instance
type StateConfig ¶
StateConfig holds state configuration