Documentation
¶
Index ¶
- Constants
- Variables
- func FormatHexPubKey(pubKey string) string
- func InitExecutor(cfg *types.Chain33Config)
- func InitFork(cfg *types.Chain33Config)
- func NewType(cfg *types.Chain33Config) *rollupType
- func RegisterRollupServer(s *grpc.Server, srv RollupServer)
- type BlockBatch
- func (*BlockBatch) Descriptor() ([]byte, []int)deprecated
- func (x *BlockBatch) GetAggregateTxSign() []byte
- func (x *BlockBatch) GetBlockFragIndex() int32
- func (x *BlockBatch) GetBlockHeaders() []*types.Header
- func (x *BlockBatch) GetCrossTxCheckHash() []byte
- func (x *BlockBatch) GetCrossTxResults() []byte
- func (x *BlockBatch) GetPubKeyList() [][]byte
- func (x *BlockBatch) GetTxAddrIDList() []byte
- func (x *BlockBatch) GetTxList() [][]byte
- func (*BlockBatch) ProtoMessage()
- func (x *BlockBatch) ProtoReflect() protoreflect.Message
- func (x *BlockBatch) Reset()
- func (x *BlockBatch) String() string
- type ChainTitle
- type CheckPoint
- func (*CheckPoint) Descriptor() ([]byte, []int)deprecated
- func (x *CheckPoint) GetAggregateValidatorSign() []byte
- func (x *CheckPoint) GetBatch() *BlockBatch
- func (x *CheckPoint) GetChainTitle() string
- func (x *CheckPoint) GetCommitRound() int64
- func (x *CheckPoint) GetCrossTxSyncedHeight() int64
- func (x *CheckPoint) GetValidatorPubs() [][]byte
- func (*CheckPoint) ProtoMessage()
- func (x *CheckPoint) ProtoReflect() protoreflect.Message
- func (x *CheckPoint) Reset()
- func (x *CheckPoint) String() string
- type CommitRoundInfo
- func (*CommitRoundInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CommitRoundInfo) GetBlockRootHash() string
- func (x *CommitRoundInfo) GetCommitRound() int64
- func (x *CommitRoundInfo) GetCommitTxCount() int32
- func (x *CommitRoundInfo) GetCrossTxCheckHash() string
- func (x *CommitRoundInfo) GetCrossTxResults() string
- func (x *CommitRoundInfo) GetFirstBlockHeight() int64
- func (x *CommitRoundInfo) GetLastBlockHeight() int64
- func (*CommitRoundInfo) ProtoMessage()
- func (x *CommitRoundInfo) ProtoReflect() protoreflect.Message
- func (x *CommitRoundInfo) Reset()
- func (x *CommitRoundInfo) String() string
- type ReqGetCommitRound
- func (*ReqGetCommitRound) Descriptor() ([]byte, []int)deprecated
- func (x *ReqGetCommitRound) GetChainTitle() string
- func (x *ReqGetCommitRound) GetCommitRound() int64
- func (*ReqGetCommitRound) ProtoMessage()
- func (x *ReqGetCommitRound) ProtoReflect() protoreflect.Message
- func (x *ReqGetCommitRound) Reset()
- func (x *ReqGetCommitRound) String() string
- type RollupAction
- func (*RollupAction) Descriptor() ([]byte, []int)deprecated
- func (x *RollupAction) GetCommit() *CheckPoint
- func (x *RollupAction) GetTy() int32
- func (m *RollupAction) GetValue() isRollupAction_Value
- func (*RollupAction) ProtoMessage()
- func (x *RollupAction) ProtoReflect() protoreflect.Message
- func (x *RollupAction) Reset()
- func (x *RollupAction) String() string
- type RollupAction_Commit
- type RollupClient
- type RollupServer
- type RollupStatus
- func (*RollupStatus) Descriptor() ([]byte, []int)deprecated
- func (x *RollupStatus) GetBlockFragIndex() int32
- func (x *RollupStatus) GetCommitAddr() string
- func (x *RollupStatus) GetCommitBlockHash() string
- func (x *RollupStatus) GetCommitBlockHeight() int64
- func (x *RollupStatus) GetCommitRound() int64
- func (x *RollupStatus) GetCrossTxSyncedHeight() int64
- func (x *RollupStatus) GetTimestamp() int64
- func (*RollupStatus) ProtoMessage()
- func (x *RollupStatus) ProtoReflect() protoreflect.Message
- func (x *RollupStatus) Reset()
- func (x *RollupStatus) String() string
- type UnimplementedRollupServer
- type ValidatorPubs
- type ValidatorSignMsg
- func (*ValidatorSignMsg) Descriptor() ([]byte, []int)deprecated
- func (x *ValidatorSignMsg) GetCommitRound() int64
- func (x *ValidatorSignMsg) GetMsgHash() []byte
- func (x *ValidatorSignMsg) GetPubKey() []byte
- func (x *ValidatorSignMsg) GetSignature() []byte
- func (*ValidatorSignMsg) ProtoMessage()
- func (x *ValidatorSignMsg) ProtoReflect() protoreflect.Message
- func (x *ValidatorSignMsg) Reset()
- func (x *ValidatorSignMsg) String() string
Constants ¶
const ( TyUnknowAction = iota + 100 TyCommitAction NameCommitAction = "Commit" )
action类型id和name,这些常量可以自定义修改
const ( TyUnknownLog = iota + 100 TyCommitRoundInfoLog TyRollupStatusLog NameCommitRoundInfoLog = "CommitRoundInfoLog" NameRollupStatusLog = "RollupStatusLog" )
log类型id值
const (
// RollupCommitTimeout rollup提交超时秒数, 超过该值未提交下一个round数据, 即为超时
RollupCommitTimeout = 600
)
Variables ¶
var File_rollup_proto protoreflect.FileDescriptor
var (
//RollupX 执行器名称定义
RollupX = "rollup"
)
Functions ¶
func InitExecutor ¶
func InitExecutor(cfg *types.Chain33Config)
InitExecutor defines register executor
func NewType ¶
func NewType(cfg *types.Chain33Config) *rollupType
func RegisterRollupServer ¶
func RegisterRollupServer(s *grpc.Server, srv RollupServer)
Types ¶
type BlockBatch ¶
type BlockBatch struct {
BlockHeaders []*types.Header `protobuf:"bytes,1,rep,name=blockHeaders,proto3" json:"blockHeaders,omitempty"`
// 区块过大, 分段提交分割位置(交易下标)
BlockFragIndex int32 `protobuf:"varint,2,opt,name=blockFragIndex,proto3" json:"blockFragIndex,omitempty"`
TxList [][]byte `protobuf:"bytes,3,rep,name=txList,proto3" json:"txList,omitempty"`
PubKeyList [][]byte `protobuf:"bytes,4,rep,name=pubKeyList,proto3" json:"pubKeyList,omitempty"`
AggregateTxSign []byte `protobuf:"bytes,5,opt,name=aggregateTxSign,proto3" json:"aggregateTxSign,omitempty"`
TxAddrIDList []byte `protobuf:"bytes,6,opt,name=txAddrIDList,proto3" json:"txAddrIDList,omitempty"`
CrossTxCheckHash []byte `protobuf:"bytes,7,opt,name=crossTxCheckHash,proto3" json:"crossTxCheckHash,omitempty"`
CrossTxResults []byte `protobuf:"bytes,8,opt,name=crossTxResults,proto3" json:"crossTxResults,omitempty"`
// contains filtered or unexported fields
}
func (*BlockBatch) Descriptor
deprecated
func (*BlockBatch) Descriptor() ([]byte, []int)
Deprecated: Use BlockBatch.ProtoReflect.Descriptor instead.
func (*BlockBatch) GetAggregateTxSign ¶
func (x *BlockBatch) GetAggregateTxSign() []byte
func (*BlockBatch) GetBlockFragIndex ¶
func (x *BlockBatch) GetBlockFragIndex() int32
func (*BlockBatch) GetBlockHeaders ¶
func (x *BlockBatch) GetBlockHeaders() []*types.Header
func (*BlockBatch) GetCrossTxCheckHash ¶
func (x *BlockBatch) GetCrossTxCheckHash() []byte
func (*BlockBatch) GetCrossTxResults ¶
func (x *BlockBatch) GetCrossTxResults() []byte
func (*BlockBatch) GetPubKeyList ¶
func (x *BlockBatch) GetPubKeyList() [][]byte
func (*BlockBatch) GetTxAddrIDList ¶
func (x *BlockBatch) GetTxAddrIDList() []byte
func (*BlockBatch) GetTxList ¶
func (x *BlockBatch) GetTxList() [][]byte
func (*BlockBatch) ProtoMessage ¶
func (*BlockBatch) ProtoMessage()
func (*BlockBatch) ProtoReflect ¶
func (x *BlockBatch) ProtoReflect() protoreflect.Message
func (*BlockBatch) Reset ¶
func (x *BlockBatch) Reset()
func (*BlockBatch) String ¶
func (x *BlockBatch) String() string
type ChainTitle ¶
type ChainTitle struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*ChainTitle) Descriptor
deprecated
func (*ChainTitle) Descriptor() ([]byte, []int)
Deprecated: Use ChainTitle.ProtoReflect.Descriptor instead.
func (*ChainTitle) GetValue ¶
func (x *ChainTitle) GetValue() string
func (*ChainTitle) ProtoMessage ¶
func (*ChainTitle) ProtoMessage()
func (*ChainTitle) ProtoReflect ¶
func (x *ChainTitle) ProtoReflect() protoreflect.Message
func (*ChainTitle) Reset ¶
func (x *ChainTitle) Reset()
func (*ChainTitle) String ¶
func (x *ChainTitle) String() string
type CheckPoint ¶
type CheckPoint struct {
ChainTitle string `protobuf:"bytes,1,opt,name=chainTitle,proto3" json:"chainTitle,omitempty"`
CommitRound int64 `protobuf:"varint,2,opt,name=commitRound,proto3" json:"commitRound,omitempty"`
Batch *BlockBatch `protobuf:"bytes,3,opt,name=batch,proto3" json:"batch,omitempty"`
ValidatorPubs [][]byte `protobuf:"bytes,4,rep,name=validatorPubs,proto3" json:"validatorPubs,omitempty"`
AggregateValidatorSign []byte `protobuf:"bytes,5,opt,name=aggregateValidatorSign,proto3" json:"aggregateValidatorSign,omitempty"`
// main chain block height
CrossTxSyncedHeight int64 `protobuf:"varint,6,opt,name=crossTxSyncedHeight,proto3" json:"crossTxSyncedHeight,omitempty"`
// contains filtered or unexported fields
}
CheckPoint
func (*CheckPoint) Descriptor
deprecated
func (*CheckPoint) Descriptor() ([]byte, []int)
Deprecated: Use CheckPoint.ProtoReflect.Descriptor instead.
func (*CheckPoint) GetAggregateValidatorSign ¶
func (x *CheckPoint) GetAggregateValidatorSign() []byte
func (*CheckPoint) GetBatch ¶
func (x *CheckPoint) GetBatch() *BlockBatch
func (*CheckPoint) GetChainTitle ¶
func (x *CheckPoint) GetChainTitle() string
func (*CheckPoint) GetCommitRound ¶
func (x *CheckPoint) GetCommitRound() int64
func (*CheckPoint) GetCrossTxSyncedHeight ¶
func (x *CheckPoint) GetCrossTxSyncedHeight() int64
func (*CheckPoint) GetValidatorPubs ¶
func (x *CheckPoint) GetValidatorPubs() [][]byte
func (*CheckPoint) ProtoMessage ¶
func (*CheckPoint) ProtoMessage()
func (*CheckPoint) ProtoReflect ¶
func (x *CheckPoint) ProtoReflect() protoreflect.Message
func (*CheckPoint) Reset ¶
func (x *CheckPoint) Reset()
func (*CheckPoint) String ¶
func (x *CheckPoint) String() string
type CommitRoundInfo ¶
type CommitRoundInfo struct {
CommitRound int64 `protobuf:"varint,1,opt,name=commitRound,proto3" json:"commitRound,omitempty"`
FirstBlockHeight int64 `protobuf:"varint,2,opt,name=firstBlockHeight,proto3" json:"firstBlockHeight,omitempty"`
LastBlockHeight int64 `protobuf:"varint,3,opt,name=lastBlockHeight,proto3" json:"lastBlockHeight,omitempty"`
CommitTxCount int32 `protobuf:"varint,4,opt,name=commitTxCount,proto3" json:"commitTxCount,omitempty"`
CrossTxCheckHash string `protobuf:"bytes,5,opt,name=crossTxCheckHash,proto3" json:"crossTxCheckHash,omitempty"`
CrossTxResults string `protobuf:"bytes,6,opt,name=crossTxResults,proto3" json:"crossTxResults,omitempty"`
BlockRootHash string `protobuf:"bytes,7,opt,name=blockRootHash,proto3" json:"blockRootHash,omitempty"`
// contains filtered or unexported fields
}
func (*CommitRoundInfo) Descriptor
deprecated
func (*CommitRoundInfo) Descriptor() ([]byte, []int)
Deprecated: Use CommitRoundInfo.ProtoReflect.Descriptor instead.
func (*CommitRoundInfo) GetBlockRootHash ¶
func (x *CommitRoundInfo) GetBlockRootHash() string
func (*CommitRoundInfo) GetCommitRound ¶
func (x *CommitRoundInfo) GetCommitRound() int64
func (*CommitRoundInfo) GetCommitTxCount ¶
func (x *CommitRoundInfo) GetCommitTxCount() int32
func (*CommitRoundInfo) GetCrossTxCheckHash ¶
func (x *CommitRoundInfo) GetCrossTxCheckHash() string
func (*CommitRoundInfo) GetCrossTxResults ¶
func (x *CommitRoundInfo) GetCrossTxResults() string
func (*CommitRoundInfo) GetFirstBlockHeight ¶
func (x *CommitRoundInfo) GetFirstBlockHeight() int64
func (*CommitRoundInfo) GetLastBlockHeight ¶
func (x *CommitRoundInfo) GetLastBlockHeight() int64
func (*CommitRoundInfo) ProtoMessage ¶
func (*CommitRoundInfo) ProtoMessage()
func (*CommitRoundInfo) ProtoReflect ¶
func (x *CommitRoundInfo) ProtoReflect() protoreflect.Message
func (*CommitRoundInfo) Reset ¶
func (x *CommitRoundInfo) Reset()
func (*CommitRoundInfo) String ¶
func (x *CommitRoundInfo) String() string
type ReqGetCommitRound ¶
type ReqGetCommitRound struct {
CommitRound int64 `protobuf:"varint,1,opt,name=commitRound,proto3" json:"commitRound,omitempty"`
ChainTitle string `protobuf:"bytes,2,opt,name=chainTitle,proto3" json:"chainTitle,omitempty"`
// contains filtered or unexported fields
}
func (*ReqGetCommitRound) Descriptor
deprecated
func (*ReqGetCommitRound) Descriptor() ([]byte, []int)
Deprecated: Use ReqGetCommitRound.ProtoReflect.Descriptor instead.
func (*ReqGetCommitRound) GetChainTitle ¶
func (x *ReqGetCommitRound) GetChainTitle() string
func (*ReqGetCommitRound) GetCommitRound ¶
func (x *ReqGetCommitRound) GetCommitRound() int64
func (*ReqGetCommitRound) ProtoMessage ¶
func (*ReqGetCommitRound) ProtoMessage()
func (*ReqGetCommitRound) ProtoReflect ¶
func (x *ReqGetCommitRound) ProtoReflect() protoreflect.Message
func (*ReqGetCommitRound) Reset ¶
func (x *ReqGetCommitRound) Reset()
func (*ReqGetCommitRound) String ¶
func (x *ReqGetCommitRound) String() string
type RollupAction ¶
type RollupAction struct {
Ty int32 `protobuf:"varint,1,opt,name=ty,proto3" json:"ty,omitempty"`
// Types that are assignable to Value:
// *RollupAction_Commit
Value isRollupAction_Value `protobuf_oneof:"value"`
// contains filtered or unexported fields
}
rollup合约交易行为总类型
func (*RollupAction) Descriptor
deprecated
func (*RollupAction) Descriptor() ([]byte, []int)
Deprecated: Use RollupAction.ProtoReflect.Descriptor instead.
func (*RollupAction) GetCommit ¶
func (x *RollupAction) GetCommit() *CheckPoint
func (*RollupAction) GetTy ¶
func (x *RollupAction) GetTy() int32
func (*RollupAction) GetValue ¶
func (m *RollupAction) GetValue() isRollupAction_Value
func (*RollupAction) ProtoMessage ¶
func (*RollupAction) ProtoMessage()
func (*RollupAction) ProtoReflect ¶
func (x *RollupAction) ProtoReflect() protoreflect.Message
func (*RollupAction) Reset ¶
func (x *RollupAction) Reset()
func (*RollupAction) String ¶
func (x *RollupAction) String() string
type RollupAction_Commit ¶
type RollupAction_Commit struct {
Commit *CheckPoint `protobuf:"bytes,2,opt,name=commit,proto3,oneof"`
}
type RollupClient ¶
type RollupClient interface {
}
RollupClient is the client API for Rollup service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRollupClient ¶
func NewRollupClient(cc grpc.ClientConnInterface) RollupClient
type RollupServer ¶
type RollupServer interface {
}
RollupServer is the server API for Rollup service.
type RollupStatus ¶
type RollupStatus struct {
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
CommitRound int64 `protobuf:"varint,2,opt,name=commitRound,proto3" json:"commitRound,omitempty"`
CommitBlockHeight int64 `protobuf:"varint,3,opt,name=commitBlockHeight,proto3" json:"commitBlockHeight,omitempty"`
// 区块过大, 分段提交分割位置(交易下标)
BlockFragIndex int32 `protobuf:"varint,4,opt,name=blockFragIndex,proto3" json:"blockFragIndex,omitempty"`
CommitBlockHash string `protobuf:"bytes,5,opt,name=commitBlockHash,proto3" json:"commitBlockHash,omitempty"`
CommitAddr string `protobuf:"bytes,6,opt,name=commitAddr,proto3" json:"commitAddr,omitempty"`
// main chain block height
CrossTxSyncedHeight int64 `protobuf:"varint,7,opt,name=crossTxSyncedHeight,proto3" json:"crossTxSyncedHeight,omitempty"`
// contains filtered or unexported fields
}
func (*RollupStatus) Descriptor
deprecated
func (*RollupStatus) Descriptor() ([]byte, []int)
Deprecated: Use RollupStatus.ProtoReflect.Descriptor instead.
func (*RollupStatus) GetBlockFragIndex ¶
func (x *RollupStatus) GetBlockFragIndex() int32
func (*RollupStatus) GetCommitAddr ¶
func (x *RollupStatus) GetCommitAddr() string
func (*RollupStatus) GetCommitBlockHash ¶
func (x *RollupStatus) GetCommitBlockHash() string
func (*RollupStatus) GetCommitBlockHeight ¶
func (x *RollupStatus) GetCommitBlockHeight() int64
func (*RollupStatus) GetCommitRound ¶
func (x *RollupStatus) GetCommitRound() int64
func (*RollupStatus) GetCrossTxSyncedHeight ¶
func (x *RollupStatus) GetCrossTxSyncedHeight() int64
func (*RollupStatus) GetTimestamp ¶
func (x *RollupStatus) GetTimestamp() int64
func (*RollupStatus) ProtoMessage ¶
func (*RollupStatus) ProtoMessage()
func (*RollupStatus) ProtoReflect ¶
func (x *RollupStatus) ProtoReflect() protoreflect.Message
func (*RollupStatus) Reset ¶
func (x *RollupStatus) Reset()
func (*RollupStatus) String ¶
func (x *RollupStatus) String() string
type UnimplementedRollupServer ¶
type UnimplementedRollupServer struct {
}
UnimplementedRollupServer can be embedded to have forward compatible implementations.
type ValidatorPubs ¶
type ValidatorPubs struct {
BlsPubs []string `protobuf:"bytes,1,rep,name=blsPubs,proto3" json:"blsPubs,omitempty"`
// contains filtered or unexported fields
}
func (*ValidatorPubs) Descriptor
deprecated
func (*ValidatorPubs) Descriptor() ([]byte, []int)
Deprecated: Use ValidatorPubs.ProtoReflect.Descriptor instead.
func (*ValidatorPubs) GetBlsPubs ¶
func (x *ValidatorPubs) GetBlsPubs() []string
func (*ValidatorPubs) ProtoMessage ¶
func (*ValidatorPubs) ProtoMessage()
func (*ValidatorPubs) ProtoReflect ¶
func (x *ValidatorPubs) ProtoReflect() protoreflect.Message
func (*ValidatorPubs) Reset ¶
func (x *ValidatorPubs) Reset()
func (*ValidatorPubs) String ¶
func (x *ValidatorPubs) String() string
type ValidatorSignMsg ¶
type ValidatorSignMsg struct {
CommitRound int64 `protobuf:"varint,1,opt,name=commitRound,proto3" json:"commitRound,omitempty"`
PubKey []byte `protobuf:"bytes,2,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
MsgHash []byte `protobuf:"bytes,4,opt,name=msgHash,proto3" json:"msgHash,omitempty"`
// contains filtered or unexported fields
}
func (*ValidatorSignMsg) Descriptor
deprecated
func (*ValidatorSignMsg) Descriptor() ([]byte, []int)
Deprecated: Use ValidatorSignMsg.ProtoReflect.Descriptor instead.
func (*ValidatorSignMsg) GetCommitRound ¶
func (x *ValidatorSignMsg) GetCommitRound() int64
func (*ValidatorSignMsg) GetMsgHash ¶
func (x *ValidatorSignMsg) GetMsgHash() []byte
func (*ValidatorSignMsg) GetPubKey ¶
func (x *ValidatorSignMsg) GetPubKey() []byte
func (*ValidatorSignMsg) GetSignature ¶
func (x *ValidatorSignMsg) GetSignature() []byte
func (*ValidatorSignMsg) ProtoMessage ¶
func (*ValidatorSignMsg) ProtoMessage()
func (*ValidatorSignMsg) ProtoReflect ¶
func (x *ValidatorSignMsg) ProtoReflect() protoreflect.Message
func (*ValidatorSignMsg) Reset ¶
func (x *ValidatorSignMsg) Reset()
func (*ValidatorSignMsg) String ¶
func (x *ValidatorSignMsg) String() string