libstate

package
v0.0.0-...-ab61f1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "StateService"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminClient

type AdminClient struct {
	Cl   *Client
	GMsg *byzcoin.CreateGenesisBlock
	// contains filtered or unexported fields
}

func NewAdminClient

func NewAdminClient(byzcoin *byzcoin.Client, signer darc.Signer,
	gMsg *byzcoin.CreateGenesisBlock) *AdminClient

func SetupByzcoin

func SetupByzcoin(r *onet.Roster, blockTime int) (*AdminClient,
	skipchain.SkipBlockID, error)

func (*AdminClient) SpawnDarc

func (c *AdminClient) SpawnDarc(newSigner darc.Signer, gDarc darc.Darc, wait int) (*darc.Darc, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(byzcoin *byzcoin.Client) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) DummyGetProof

func (c *Client) DummyGetProof(cid byzcoin.InstanceID) (*byzcoin.GetProofResponse, error)

func (*Client) DummyUpdate

func (c *Client) DummyUpdate(cid byzcoin.InstanceID, args byzcoin.Arguments,
	wait int) (*DummyReply, error)

func (*Client) FetchGenesisBlock

func (c *Client) FetchGenesisBlock(scID skipchain.SkipBlockID) (*skipchain.
	SkipBlock, error)

FetchGenesisBlock requires the hash of the genesis block. To retrieve, use proof.Latest.SkipchainID()

func (*Client) GetState

func (c *Client) GetState(cid byzcoin.InstanceID) (*GetStateReply,
	error)

func (*Client) InitContract

func (c *Client) InitContract(raw *core.ContractRaw, hdr *core.ContractHeader,
	initArgs byzcoin.Arguments, wait int) (*InitContractReply, error)

func (*Client) InitUnit

func (c *Client) InitUnit(req *InitUnitRequest) (*InitUnitReply, error)

func (*Client) UpdateState

func (c *Client) UpdateState(args byzcoin.Arguments,
	execReq *core.ExecutionRequest, inReceipts map[int]map[string]*core.
		OpcodeReceipt, wait int) (*UpdateStateReply, error)

func (*Client) WaitProof

func (c *Client) WaitProof(id []byte, currRoot []byte, interval int) (
	*byzcoin.Proof, error)

type DummyReply

type DummyReply struct {
	TxResp *byzcoin.AddTxResponse
}

type DummyRequest

type DummyRequest struct {
	CID   byzcoin.InstanceID
	Input base.UpdateInput
	Wait  int
}

type GetStateReply

type GetStateReply struct {
	Proof core.StateProof
}

type GetStateRequest

type GetStateRequest struct {
	CID byzcoin.InstanceID
}

type InitContractReply

type InitContractReply struct {
	CID    byzcoin.InstanceID
	TxResp *byzcoin.AddTxResponse
}

type InitContractRequest

type InitContractRequest struct {
	Raw      *core.ContractRaw
	Header   *core.ContractHeader
	InitArgs byzcoin.Arguments
	Wait     int
}

type InitUnitReply

type InitUnitReply struct{}

type InitUnitRequest

type InitUnitRequest struct {
	ByzID  skipchain.SkipBlockID
	Roster *onet.Roster
	Darc   *darc.Darc
	Signer darc.Signer
}

type Request

type Request struct {
	Data interface{}
}

type Service

type Service struct {
	*onet.ServiceProcessor
	// contains filtered or unexported fields
}

func (*Service) DummyUpdate

func (s *Service) DummyUpdate(req *DummyRequest) (*DummyReply, error)

func (*Service) GetState

func (s *Service) GetState(req *GetStateRequest) (*GetStateReply, error)

func (*Service) InitContract

func (s *Service) InitContract(req *InitContractRequest) (*InitContractReply, error)

func (*Service) InitUnit

func (s *Service) InitUnit(req *InitUnitRequest) (*InitUnitReply, error)

func (*Service) UpdateState

func (s *Service) UpdateState(req *UpdateStateRequest) (*UpdateStateReply, error)

type UpdateStateReply

type UpdateStateReply struct {
	TxResp *byzcoin.AddTxResponse
}

type UpdateStateRequest

type UpdateStateRequest struct {
	Input         base.UpdateInput
	ExecReq       core.ExecutionRequest
	Wait          int
	InputReceipts map[int]map[string]*core.OpcodeReceipt
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL