Documentation ¶
Index ¶
Constants ¶
View Source
const FINE = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { BlockId int64 `json:"block_id"` SubHash *SubHash `json:"hash_sub"` SubSignature *SubSignature `json:"signature_sub"` SubTx *SubTx `json:"tx_sub"` }
func GenesisBlock ¶
func GenesisBlock(commitProof *proto.CommitProof, priv crypto.PrivKeyEd25519, spaceProof *proto.SpaceProof, txs []*Tx) *Block
func NewBlock ¶
func NewBlock(commitProof *proto.CommitProof, prevBlock *Block, priv crypto.PrivKeyEd25519, spaceProof *proto.SpaceProof, txs []*Tx) *Block
type In ¶
type In struct { PubKey crypto.PubKeyEd25519 `json:"public_key"` Signature crypto.SignatureEd25519 `json:"signature"` //sig(tx_id, past_tx_id, past_beneficiary, out) TxId int64 `json:"tx_id"` }
type InSign ¶
type InSign struct { Outs []*Out `json:"out"` PastTxId int64 `json:"past_tx_id"` Pubkey crypto.PubKeyEd25519 `json:"public_key"` TxId int64 `json:"tx_id"` }
type Out ¶
type Out struct { PubKey crypto.PubKeyEd25519 `json:"public_key"` Value int64 `json:"value"` }
type Punishment ¶
type Punishment struct { BlockId int64 `json:"block_id"` PubKey crypto.PubKeyEd25519 `json:"public_key"` PunishmentProof *PunishmentProof `json:"punishment_proof"` }
func NewPunishment ¶
func NewPunishment(blockId int64, pub crypto.PubKeyEd25519, proof *PunishmentProof) *Punishment
type PunishmentProof ¶
type PunishmentProof struct { Chain1Next *Block `json:"chain1_next_block"` Chain1Recent *Block `json:"chain1_recent_block"` Chain2Next *Block `json:"chain2_next_block"` Chain2Recent *Block `json:"chain2_recent_block"` PubKey crypto.PubKeyEd25519 `json:"public_key"` }
func NewPunishmentProof ¶
func NewPunishmentProof(pub crypto.PubKeyEd25519, chain1Next, chain1Recent, chain2Next, chain2Recent *Block) *PunishmentProof
type SubHash ¶
type SubHash struct { BlockId int64 `json:"block_id"` CommitProof *proto.CommitProof `json:"commit_proof"` SpaceProof *proto.SpaceProof `json:"space_proof"` Signature crypto.SignatureEd25519 `json:"signature"` }
func NewSubHash ¶
func NewSubHash(blockId int64, commitProof *proto.CommitProof, prevSubHash *SubHash, priv crypto.PrivKeyEd25519, spaceProof *proto.SpaceProof) *SubHash
type SubSignature ¶
type SubSignature struct { BlockId int64 `json:"block_id"` SignatureSig crypto.SignatureEd25519 `json:"signature_sig"` SignatureTx crypto.SignatureEd25519 `json:"signature_tx"` }
func NewSubSignature ¶
func NewSubSignature(blockId int64, prevSubSig *SubSignature, priv crypto.PrivKeyEd25519, subTx *SubTx) *SubSignature
func (*SubSignature) Serialize ¶
func (subSig *SubSignature) Serialize() []byte
type TxCommit ¶
type TxCommit struct { Commit []byte `json:"commit"` PubKey crypto.PubKeyEd25519 `json:"public_key"` TxId int64 `json:"tx_id"` }
func NewTxCommit ¶
type TxPayment ¶
type TxPunishment ¶
type TxPunishment struct { PubKey crypto.PubKeyEd25519 `json:"public_key"` Punishment *Punishment `json:"punishment"` TxId int64 `json:"tx_id"` }
func NewTxPunishment ¶
func NewTxPunishment(pub crypto.PubKeyEd25519, punishment *Punishment, txId int64) *TxPunishment
func (*TxPunishment) IsTx ¶
func (_ *TxPunishment) IsTx()
Click to show internal directories.
Click to hide internal directories.