package json

import "go.dedis.ch/dela/core/ordering/cosipbft/json"

Index

Types

type BlockJSON

type BlockJSON struct {
	Index    uint64
	TreeRoot []byte
	Data     json.RawMessage
}

BlockJSON is the JSON message for a block.

type BlockMessageJSON

type BlockMessageJSON struct {
	Block json.RawMessage
	Views map[string]ViewMessageJSON
}

BlockMessageJSON is the JSON message to send a block.

type ChainJSON

type ChainJSON struct {
	Links []json.RawMessage
}

ChainJSON is the JSON message for a chain.

type CommitMessageJSON

type CommitMessageJSON struct {
	ID        []byte
	Signature json.RawMessage
}

CommitMessageJSON is the JSON message to send a commit request.

type DoneMessageJSON

type DoneMessageJSON struct {
	ID        []byte
	Signature json.RawMessage
}

DoneMessageJSON is the JSON message to send a block confirmation.

type GenesisJSON

type GenesisJSON struct {
	Roster   json.RawMessage
	TreeRoot []byte
}

GenesisJSON is the JSON message for a genesis block.

type GenesisMessageJSON

type GenesisMessageJSON struct {
	Genesis json.RawMessage
}

GenesisMessageJSON is the JSON message to send a genesis block.

type LinkJSON

type LinkJSON struct {
	From             []byte
	To               []byte `json:",omitempty"`
	PrepareSignature json.RawMessage
	CommitSignature  json.RawMessage
	ChangeSet        json.RawMessage
	Block            json.RawMessage `json:",omitempty"`
}

LinkJSON is the JSON message for a link.

type MessageJSON

type MessageJSON struct {
	Genesis *GenesisMessageJSON `json:",omitempty"`
	Block   *BlockMessageJSON   `json:",omitempty"`
	Commit  *CommitMessageJSON  `json:",omitempty"`
	Done    *DoneMessageJSON    `json:",omitempty"`
	View    *ViewMessageJSON    `json:",omitempty"`
}

MessageJSON is the JSON message that wraps the different kinds of messages.

type ViewMessageJSON

type ViewMessageJSON struct {
	Leader    uint16
	ID        []byte
	Signature json.RawMessage
}

ViewMessageJSON is the JSON message to send a view change request.

Source Files

chain.go json.go link.go

Version
v0.1.0 (latest)
Published
Apr 10, 2024
Platform
linux/amd64
Imports
8 packages
Last checked
1 month ago

Tools for package owners.