Commit 9f60df2f authored by harrylee's avatar harrylee

update broker

parent 65527d44
Pipeline #8119 failed with stages
in 0 seconds
...@@ -22,6 +22,7 @@ var driverName = brokertypes.BrokerX ...@@ -22,6 +22,7 @@ var driverName = brokertypes.BrokerX
// Init register dapp // Init register dapp
func Init(name string, cfg *types.Chain33Config, sub []byte) { func Init(name string, cfg *types.Chain33Config, sub []byte) {
drivers.Register(cfg, GetName(), newBroker, cfg.GetDappFork(driverName, "Enable")) drivers.Register(cfg, GetName(), newBroker, cfg.GetDappFork(driverName, "Enable"))
//TODO 初始化时,需要把应用链的ID加载进去
InitExecType() InitExecType()
} }
......
...@@ -4,10 +4,10 @@ import ( ...@@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"github.com/33cn/chain33/client" "github.com/33cn/chain33/client"
dbm "github.com/33cn/chain33/common/db" dbm "github.com/33cn/chain33/common/db"
tab "github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
brokertypes "github.com/33cn/plugin/plugin/dapp/broker/types" brokertypes "github.com/33cn/plugin/plugin/dapp/broker/types"
storagetypes "github.com/33cn/plugin/plugin/dapp/storage/types" storagetypes "github.com/33cn/plugin/plugin/dapp/storage/types"
"strconv"
) )
//BrokerDB ... //BrokerDB ...
...@@ -29,86 +29,316 @@ func newBrokerDB(b *broker, tx *types.Transaction, index int) *BrokerDB { ...@@ -29,86 +29,316 @@ func newBrokerDB(b *broker, tx *types.Transaction, index int) *BrokerDB {
b.GetBlockTime(), b.GetHeight(), index} b.GetBlockTime(), b.GetHeight(), index}
} }
////GetKVSet ... //GetKVSet ...
//func (b *BrokerDB) GetKVSet() (kvset []*types.KeyValue) { func (b *BrokerDB) GetMetaKVSet(req uint64,meta *brokertypes.Meta) (kvset []*types.KeyValue) {
// kvset = append(kvset, &types.KeyValue{Key: Key(common.ToHex(s.txhash)), Value: types.Encode(payload)}) if req == brokertypes.Req_Callback{
// return kvset kvset = append(kvset, &types.KeyValue{Key: calCallBackMetaKey(), Value: types.Encode(meta)})
//} }else if req == brokertypes.Req_Inner {
func(b *BrokerDB)register(payload *brokertypes.Register )(*types.Receipt, error){ kvset = append(kvset, &types.KeyValue{Key: calInnerMetaKey(), Value: types.Encode(meta)})
}else if req == brokertypes.Req_DstRollback{
kvset = append(kvset, &types.KeyValue{Key: calDstRollBackMetaKey(), Value: types.Encode(meta)})
}
return kvset
}
return nil,nil //GetKVSet ...
func (b *BrokerDB) GetEventKVSet(event *brokertypes.InterchainEvent) (kvset []*types.KeyValue) {
kvset = append(kvset, &types.KeyValue{Key: calServicePair(event.GetSrcServiceID(),event.GetDstServiceID(),event.Index), Value: types.Encode(event)})
return kvset
} }
//其他执行器注册授权
func (b *BrokerDB) register(payload *brokertypes.Register) (*types.Receipt, error) {
func(b *BrokerDB)audit(payload *brokertypes.Audit )(*types.Receipt, error){ return nil, nil
}
//管理员审批
func (b *BrokerDB) audit(payload *brokertypes.Audit) (*types.Receipt, error) {
return nil,nil return nil, nil
} }
func(b *BrokerDB)updateEventStatus(payload *brokertypes.UpdateEventStatus)(*types.Receipt, error){ func (b *BrokerDB) updateIndex(payload *brokertypes.UpdateIndex) (*types.Receipt, error) {
//FIXME 权限检查
receipt := &types.Receipt{Ty: types.ExecOk} receipt := &types.Receipt{Ty: types.ExecOk}
log :=&brokertypes.ReceiptBrokerLog{Value:&brokertypes.ReceiptBrokerLog_UpdateEventStatus{payload},Ty:brokertypes.TyEmitInterchainEventAction} if payload.ReqType == brokertypes.Req_Inner{
receiptlog := &types.ReceiptLog{Ty:brokertypes.TyUpdateEventStatusLog,Log:types.Encode(log)} meta,err:=getMeta(b.db,calInnerMetaKey())
receipt.Logs=append(receipt.Logs,receiptlog) if err !=nil {
return receipt,nil meta = &brokertypes.Meta{
Meta: make(map[string]uint64),
XXX_NoUnkeyedLiteral: struct{}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
}
idx :=meta.Meta[genServicePair(payload.SrcServiceID,payload.DstServiceID)]
if payload.SequenceNum != idx+1 {
return nil , fmt.Errorf("incorrect index, expect %d", idx+1)
}
meta.Meta[genServicePair(payload.SrcServiceID,payload.DstServiceID)]=idx+1
kvset := b.GetMetaKVSet(payload.ReqType,meta)
kvset = append(kvset,&types.KeyValue{Key: inMsgKey(genServicePair(payload.SrcServiceID,payload.DstServiceID),idx+1), Value: types.Encode(payload.Response)})
receipt.KV =append(receipt.KV,kvset...)
}else if payload.ReqType == brokertypes.Req_Callback{
meta,err:=getMeta(b.db,calCallBackMetaKey())
if err !=nil {
meta = &brokertypes.Meta{
Meta: make(map[string]uint64),
XXX_NoUnkeyedLiteral: struct{}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
}
idx :=meta.Meta[genServicePair(payload.SrcServiceID,payload.DstServiceID)]
if payload.SequenceNum != idx+1 {
return nil , fmt.Errorf("incorrect index, expect %d", idx+1)
}
meta.Meta[genServicePair(payload.SrcServiceID,payload.DstServiceID)]=idx+1
kvset := b.GetMetaKVSet(payload.ReqType,meta)
kvset = append(kvset,&types.KeyValue{Key: outMsgKey(genServicePair(payload.SrcServiceID,payload.DstServiceID),idx+1), Value: types.Encode(payload.Response)})
receipt.KV =append(receipt.KV,kvset...)
}else if payload.ReqType == brokertypes.Req_DstRollback{
//todo
meta,err:=getMeta(b.db,calDstRollBackMetaKey())
if err !=nil {
meta = &brokertypes.Meta{
Meta: make(map[string]uint64),
XXX_NoUnkeyedLiteral: struct{}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
}
idx :=meta.Meta[genServicePair(payload.SrcServiceID,payload.DstServiceID)]
if payload.SequenceNum < idx+1 {
return nil , fmt.Errorf("incorrect dstrollback index, expect %d", idx+1)
}
meta.Meta[genServicePair(payload.SrcServiceID,payload.DstServiceID)]=payload.SequenceNum
kvset := b.GetMetaKVSet(payload.ReqType,meta)
receipt.KV =append(receipt.KV,kvset...)
}
log := &brokertypes.ReceiptBrokerLog{Value: &brokertypes.ReceiptBrokerLog_UpdateIndex{payload}, Ty: brokertypes.TyEmitInterchainEventAction}
receiptlog := &types.ReceiptLog{Ty: brokertypes.TyUpdateIndexLog, Log: types.Encode(log)}
receipt.Logs = append(receipt.Logs, receiptlog)
return receipt, nil
} }
func(b *BrokerDB)emitInterchainEvent(payload *brokertypes.InterchainEvent )(*types.Receipt, error){ func (b *BrokerDB) emitInterchainEvent(payload *brokertypes.InterchainEvent) (*types.Receipt, error) {
//FIXME 权限检查,是否需要设定指定账户拥有跨链的权限
receipt := &types.Receipt{Ty: types.ExecOk} receipt := &types.Receipt{Ty: types.ExecOk}
//发布跨链事件 分为1.信息跨链 2.代币跨链,代币跨链需要在这步将所需金额冻结在broker下面 //发布跨链事件分为 1.信息跨链 2.代币跨链,代币跨链需要在这步将所需金额冻结在broker下面
if payload.ReqType == brokertypes.Req_Type_Storage { if payload.Type == brokertypes.Req_Type_Storage {
//校验存在交易是否存在 //校验存在交易是否存在
params :=&storagetypes.QueryStorage{TxHash:payload.Args[0]} params := &storagetypes.QueryStorage{TxHash: payload.Args[0]}
_,err:=b.api.Query(storagetypes.StorageX,payload.GetFunc(),params) _, err := b.api.Query(storagetypes.StorageX, payload.GetFunc(), params)
if err != nil {
return nil, brokertypes.ErrBrokerStorageTx
}
meta, err := getMeta(b.db, calOutterMetaKey())
if err != nil { if err != nil {
return nil,brokertypes.ErrBrokerStorageTx meta = &brokertypes.Meta{
Meta: make(map[string]uint64),
XXX_NoUnkeyedLiteral: struct{}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
}
}
currServiceID,err := b.getCurrServiceID()
if err !=nil {
return nil,err
} }
log :=&brokertypes.ReceiptBrokerLog{Value:&brokertypes.ReceiptBrokerLog_EmitInterchainEvent{payload},Ty:brokertypes.TyEmitInterchainEventAction} payload.SrcServiceID=currServiceID
receiptlog := &types.ReceiptLog{Ty:brokertypes.TyEmitInterchainEventLog,Log:types.Encode(log)} //idx :=meta.Meta[genServicePair(currServiceID, payload.DstServiceID)]
receipt.Logs=append(receipt.Logs,receiptlog) meta.Meta[genServicePair(currServiceID, payload.DstServiceID)]++
kvset := &types.KeyValue{Key: calOutterMetaKey(), Value: types.Encode(meta)}
payload.Index=meta.Meta[genServicePair(currServiceID, payload.DstServiceID)]
receipt.KV=append(receipt.KV,kvset)
receipt.KV=append(receipt.KV,b.GetEventKVSet(payload)...)
log := &brokertypes.ReceiptBrokerLog{Value: &brokertypes.ReceiptBrokerLog_EmitInterchainEvent{payload}, Ty: brokertypes.TyEmitInterchainEventAction}
receiptlog := &types.ReceiptLog{Ty: brokertypes.TyEmitInterchainEventLog, Log: types.Encode(log)}
receipt.Logs = append(receipt.Logs, receiptlog)
} }
if payload.ReqType == brokertypes.Req_Type_Coins { if payload.Type == brokertypes.Req_Type_Coins {
//TODO 跨链转账 //TODO 跨链转账
} }
return receipt,nil return receipt, nil
}
//获取当前链得ID
func (b *BrokerDB) getCurrServiceID()(string,error){
return b.genFullServiceID(b.api.GetConfig().GetTitle())
} }
func (b *BrokerDB) genFullServiceID(serviceId string) (string, error) {
//TODO 需要init方法,用于初始化bixhID和appChainID
bxhId, err := b.db.Get([]byte(KeyPrefixStateDB + bxhID))
if err != nil {
return "", err
}
appchainId, err := b.db.Get([]byte(KeyPrefixLocalDB + appchainID))
if err != nil {
return "", err
}
return fmt.Sprintf("%s:%s:%s", bxhId, appchainId, serviceId), nil
}
//去状态数据库中查询Event
func getEvent(statedb dbm.KV, key []byte) (*brokertypes.InterchainEvent, error) {
data, err := statedb.Get(key)
if err != nil {
elog.Error("getEvent", "not found", "key:", key)
return nil, err
}
var event brokertypes.InterchainEvent
err = types.Decode(data, &event)
if err != nil {
elog.Error("getEvent", "can't decode", "err:", err.Error())
return nil, err
}
return &event, nil
}
//根据状态遍历时间列表(可通过定时轮循这个接口,获取跨链时间) //去状态数据库中查询meta
func findInterChainEventListByStatus(localdb dbm.KV,status, direction int32, primaryKey string) (*brokertypes.InterchainEventList, error) { func getMeta(statedb dbm.KV, key []byte) (*brokertypes.Meta, error) {
table := NewInterchainEventTable(localdb) data, err := statedb.Get(key)
prefix := []byte(fmt.Sprintf("%d",status)) if err != nil {
elog.Error("getMeta", "not found", "key:", key)
var rows []*tab.Row return nil, err
var err error
if primaryKey == "" { //第一次查询,默认展示最新得成交记录
rows, err = table.ListIndex("status", prefix, nil, brokertypes.PageSize, direction)
} else {
rows, err = table.ListIndex("status", prefix, []byte(primaryKey), brokertypes.PageSize, direction)
} }
var meta brokertypes.Meta
err = types.Decode(data, &meta)
if err != nil { if err != nil {
elog.Error("findInterChainEventListByStatus.", "err", err.Error()) elog.Error("getMeta", "can't decode", "err:", err.Error())
return nil, err return nil, err
} }
var eventList brokertypes.InterchainEventList return &meta, nil
for _, row := range rows { }
event := row.Data.(*brokertypes.InterchainEvent)
eventList.List = append(eventList.List, event) //去状态数据库中查询message
func getMessage(statedb dbm.KV, key []byte) (*brokertypes.Response, error) {
data, err := statedb.Get(key)
if err != nil {
elog.Error("getMessage", "not found", "key:", key)
return nil, err
} }
//设置主键索引 var resp brokertypes.Response
if len(rows) == int(brokertypes.PageSize) { err = types.Decode(data, &resp)
eventList.PrimaryKey = string(rows[len(rows)-1].Primary) if err != nil {
elog.Error("getMessage", "can't decode", "err:", err.Error())
return nil, err
} }
return &eventList, nil return &resp, nil
} }
//根据index查询event //监听获取跨出事件列表
func findInterChainEventByIndex(localdb dbm.KV,index uint64)(*brokertypes.InterchainEvent,error){ func pollInterEvent(statedb dbm.KV,meta *brokertypes.Meta)(*brokertypes.InterChainEventList,error){
table :=NewInterchainEventTable(localdb) outMeta,err := getMeta(statedb,calOutterMetaKey())
primaryKey := []byte(fmt.Sprintf("%018d", index))
row,err:=table.GetData(primaryKey)
if err !=nil { if err !=nil {
return nil,err elog.Error("getMeta", "not found", "key:", calOutterMetaKey)
return nil, err
}
var eventList brokertypes.InterChainEventList
for method, idx := range outMeta.Meta {
startPos, ok := meta.Meta[method]
if !ok {
startPos = 0
}
for i := startPos + 1; i <= idx; i++ {
event, err := getEvent(statedb,calEventKey(method,i))
if err != nil {
elog.Error("get out event by key %s fail",calEventKey(method,i))
continue
}
eventList.List=append(eventList.List,event)
}
}
return &eventList,nil
}
//获取outerMeta
func getOutterMeta(statedb dbm.KV)(*brokertypes.Meta,error){
return getMeta(statedb,calOutterMetaKey())
}
//获取innerMeta
func getInnerMeta(statedb dbm.KV)(*brokertypes.Meta,error){
return getMeta(statedb,calInnerMetaKey())
}
//获取message
func getInMessage(statedb dbm.KV,query *brokertypes.QueryInMessage)(*brokertypes.Response,error){
return getMessage(statedb,inMsgKey(query.InServicePair,query.SequenceNum))
}
//获取message
func getOutMessage(statedb dbm.KV,query *brokertypes.QueryOutMessage)(*brokertypes.Response,error){
return getMessage(statedb,outMsgKey(query.InServicePair,query.SequenceNum))
}
func getConfValue(cfg *types.Chain33Config, db dbm.KV, key string, defaultValue int64) int64 {
var item types.ConfigItem
value, err := getManageKey(cfg, key, db)
if err != nil {
return defaultValue
}
if value != nil {
err = types.Decode(value, &item)
if err != nil {
elog.Debug("broker getConfValue", "decode db key:", key, "err", err.Error())
return defaultValue
}
}
values := item.GetArr().GetValue()
if len(values) == 0 {
elog.Debug("broker getConfValue", "can't get value from values arr. key:", key)
return defaultValue
}
//取数组最后一位,作为最新配置项的值
v, err := strconv.ParseInt(values[len(values)-1], 10, 64)
if err != nil {
elog.Debug("broker getConfValue", "Type conversion error:", err.Error())
return defaultValue
}
return v
}
func getManagerAddr(cfg *types.Chain33Config, db dbm.KV, key, defaultValue string) string {
var item types.ConfigItem
value, err := getManageKey(cfg, key, db)
if err != nil {
return defaultValue
}
if value != nil {
err = types.Decode(value, &item)
if err != nil {
elog.Debug("broker getConfValue", "decode db key:", key, "err", err.Error())
return defaultValue
}
}
values := item.GetArr().GetValue()
if len(values) == 0 {
elog.Debug("broker getConfValue", "can't get value from values arr. key:", key)
return defaultValue
}
return values[len(values)-1]
}
func getManageKey(cfg *types.Chain33Config, key string, db dbm.KV) ([]byte, error) {
manageKey := types.ManageKey(key)
value, err := db.Get([]byte(manageKey))
if err != nil {
if cfg.IsPara() { //平行链只有一种存储方式
elog.Debug("broker getManage", "can't get value from db,key:", key, "err", err.Error())
return nil, err
}
elog.Debug("broker getManageKey", "get db key", "not found")
return getConfigKey(key, db)
}
return value, nil
}
func getConfigKey(key string, db dbm.KV) ([]byte, error) {
configKey := types.ConfigKey(key)
value, err := db.Get([]byte(configKey))
if err != nil {
elog.Debug("broker getConfigKey", "can't get value from db,key:", key, "err", err.Error())
return nil, err
} }
return row.Data.(*brokertypes.InterchainEvent),nil return value, nil
} }
\ No newline at end of file
...@@ -10,6 +10,11 @@ import ( ...@@ -10,6 +10,11 @@ import (
* 关键数据上链(statedb)并生成交易回执(log) * 关键数据上链(statedb)并生成交易回执(log)
*/ */
func (b *broker) Exec_Init()(*types.Receipt, error){
return nil,nil
}
func (b *broker) Exec_Register(payload *brokertypes.Register, tx *types.Transaction, index int) (*types.Receipt, error) { func (b *broker) Exec_Register(payload *brokertypes.Register, tx *types.Transaction, index int) (*types.Receipt, error) {
db := newBrokerDB(b,tx,index) db := newBrokerDB(b,tx,index)
return db.register(payload) return db.register(payload)
...@@ -21,9 +26,9 @@ func (b *broker) Exec_Audit(payload *brokertypes.Audit, tx *types.Transaction, i ...@@ -21,9 +26,9 @@ func (b *broker) Exec_Audit(payload *brokertypes.Audit, tx *types.Transaction, i
return db.audit(payload) return db.audit(payload)
} }
func (b *broker) Exec_UpdateEventStatus(payload *brokertypes.UpdateEventStatus, tx *types.Transaction, index int) (*types.Receipt, error) { func (b *broker) Exec_UpdateIndex(payload *brokertypes.UpdateIndex, tx *types.Transaction, index int) (*types.Receipt, error) {
db := newBrokerDB(b,tx,index) db := newBrokerDB(b,tx,index)
return db.updateEventStatus(payload) return db.updateIndex(payload)
} }
func (b *broker) Exec_EmitInterchainEvent(payload *brokertypes.InterchainEvent, tx *types.Transaction, index int) (*types.Receipt, error) { func (b *broker) Exec_EmitInterchainEvent(payload *brokertypes.InterchainEvent, tx *types.Transaction, index int) (*types.Receipt, error) {
db := newBrokerDB(b,tx,index) db := newBrokerDB(b,tx,index)
......
package executor package executor
import ( import (
"fmt"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
brokertypes "github.com/33cn/plugin/plugin/dapp/broker/types" brokertypes "github.com/33cn/plugin/plugin/dapp/broker/types"
) )
...@@ -27,36 +26,17 @@ func (b *broker) ExecLocal_Audit(payload *brokertypes.Audit, tx *types.Transacti ...@@ -27,36 +26,17 @@ func (b *broker) ExecLocal_Audit(payload *brokertypes.Audit, tx *types.Transacti
return b.addAutoRollBack(tx, dbSet.KV), nil return b.addAutoRollBack(tx, dbSet.KV), nil
} }
func (b *broker) ExecLocal_UpdateEventStatus(payload *brokertypes.UpdateEventStatus, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
func (b *broker) ExecLocal_UpdateIndex(payload *brokertypes.UpdateIndex, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
dbSet := &types.LocalDBSet{} dbSet := &types.LocalDBSet{}
table :=NewInterchainEventTable(b.GetLocalDB())
primaryKey := []byte(fmt.Sprintf("%018d", payload.Index))
row,err:=table.GetData(primaryKey)
if err !=nil {
return nil,err
}
event:=row.Data.(*brokertypes.InterchainEvent)
//更新状态
event.Status=payload.Status
table.Replace(event)
kvs,err:=table.Save()
if err !=nil {
return nil,err
}
dbSet.KV=append(dbSet.KV,kvs...)
return b.addAutoRollBack(tx, dbSet.KV), nil return b.addAutoRollBack(tx, dbSet.KV), nil
} }
func (b *broker) ExecLocal_EmitInterchainEvent(payload *brokertypes.InterchainEvent, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) { func (b *broker) ExecLocal_EmitInterchainEvent(payload *brokertypes.InterchainEvent, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
dbSet := &types.LocalDBSet{} dbSet := &types.LocalDBSet{}
table :=NewInterchainEventTable(b.GetLocalDB())
payload.Index=b.GetIndex(index)
table.Add(payload)
kvs,err:=table.Save()
if err !=nil {
return nil,err
}
dbSet.KV=append(dbSet.KV,kvs...)
return b.addAutoRollBack(tx, dbSet.KV), nil return b.addAutoRollBack(tx, dbSet.KV), nil
} }
......
package executor package executor
import "fmt"
/* /*
* 用户合约存取kv数据时,key值前缀需要满足一定规范 * 用户合约存取kv数据时,key值前缀需要满足一定规范
* 即key = keyPrefix + userKey * 即key = keyPrefix + userKey
* 需要字段前缀查询时,使用’-‘作为分割符号 * 需要字段前缀查询时,使用’-‘作为分割符号
*/ */
var ( const (
//KeyPrefixStateDB state db key必须前缀 //KeyPrefixStateDB state db key必须前缀
KeyPrefixStateDB = "mavl-broker-" KeyPrefixStateDB = "mavl-broker-"
//KeyPrefixLocalDB local db的key必须前缀 //KeyPrefixLocalDB local db的key必须前缀
KeyPrefixLocalDB = "LODB-broker-" KeyPrefixLocalDB = "LODB-broker-"
innerMeta = "inner-meta"
outterMeta = "outter-meta"
callbackMeta = "callback-meta"
dstRollbackMeta = "dst-rollback-meta"
whiteList = "white-list"
adminList = "admin-list"
passed = "1"
rejected = "2"
delimiter = "&"
bxhID = "bxh-id"
appchainID = "appchain-id"
) )
//状态数据库中存储innermeta信息
func calInnerMetaKey() []byte {
key := fmt.Sprintf("%s"+":%s", KeyPrefixStateDB, innerMeta)
return []byte(key)
}
//状态数据库中存储outtermeta信息
func calOutterMetaKey() []byte {
key := fmt.Sprintf("%s"+":%s", KeyPrefixStateDB, outterMeta)
return []byte(key)
}
func calCallBackMetaKey() []byte {
key := fmt.Sprintf("%s"+":%s", KeyPrefixStateDB, callbackMeta)
return []byte(key)
}
func calDstRollBackMetaKey() []byte {
key := fmt.Sprintf("%s"+":%s", KeyPrefixStateDB, dstRollbackMeta)
return []byte(key)
}
//生成service key
func genServicePair(from, to string) string {
return fmt.Sprintf("%s-%s",from, to)
}
func calServicePair(from,to string,index uint64)[]byte{
key :=fmt.Sprintf("%s%s-%s-%016d",KeyPrefixStateDB,from, to,index)
return []byte(key)
}
func calEventKey(servicePair string,index uint64)[]byte{
key :=fmt.Sprintf("%s%s-%016d",KeyPrefixStateDB,servicePair,index)
return []byte(key)
}
func outMsgKey(to string, index uint64) []byte {
return []byte(fmt.Sprintf("%sout-msg-%s-%016d",KeyPrefixStateDB, to, index))
}
func inMsgKey(from string, index uint64) []byte {
return []byte(fmt.Sprintf("%sin-msg-%s-%016d",KeyPrefixStateDB,from, index))
}
\ No newline at end of file
package executor package executor
import (
brokertypes "github.com/33cn/plugin/plugin/dapp/broker/types"
)
//获取innterMeta
func(b *broker) Query_QueryInnerMeta(query *brokertypes.QueryInnerMeta)(*brokertypes.Meta,error){
return getInnerMeta(b.GetStateDB())
}
//获取outterMeta
func(b *broker) Query_QueryOutterMeta(query *brokertypes.QueryOutterMeta)(*brokertypes.Meta,error){
return getOutterMeta(b.GetStateDB())
}
//获取inMessage
func(b *broker) Query_QueryInMessage(query *brokertypes.QueryInMessage)(*brokertypes.Response,error){
return getInMessage(b.GetStateDB(),query)
}
//获取outMessage
func(b *broker) Query_QueryOutMessage(query *brokertypes.QueryOutMessage)(*brokertypes.Response,error){
return getOutMessage(b.GetStateDB(),query)
}
//获取监听列表
func(b *broker) Query_PollingEvent(query *brokertypes.PollingEvent)(*brokertypes.InterChainEventList,error){
return pollInterEvent(b.GetStateDB(),query.Meta)
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ var opt_broker_event = &table.Option{ ...@@ -13,7 +13,7 @@ var opt_broker_event = &table.Option{
Prefix: KeyPrefixLocalDB, Prefix: KeyPrefixLocalDB,
Name: "broker", Name: "broker",
Primary: "index", Primary: "index",
Index: []string{"dstChainID", "status","reqType"}, Index: []string{"dstServiceID", "status","reqType"},
} }
...@@ -45,12 +45,12 @@ func (m *InterchainEventRow) SetPayload(data types.Message) error { ...@@ -45,12 +45,12 @@ func (m *InterchainEventRow) SetPayload(data types.Message) error {
func (m *InterchainEventRow) Get(key string) ([]byte, error) { func (m *InterchainEventRow) Get(key string) ([]byte, error) {
if key == "index" { if key == "index" {
return []byte(fmt.Sprintf("%018d", m.Index)), nil return []byte(fmt.Sprintf("%018d", m.Index)), nil
} else if key == "dstChainID" { } else if key == "dstServiceID" {
return []byte(fmt.Sprintf("%s", m.GetDstChainID())), nil return []byte(fmt.Sprintf("%s", m.GetDstServiceID())), nil
} else if key == "status" { } else if key == "status" {
return []byte(fmt.Sprintf("%d", m.GetStatus())), nil return []byte(fmt.Sprintf("%d", m.GetStatus())), nil
}else if key == "reqType" { }else if key == "type" {
return []byte(fmt.Sprintf("%d", m.GetReqType())), nil return []byte(fmt.Sprintf("%d", m.GetType())), nil
} }
return nil, types.ErrNotFound return nil, types.ErrNotFound
} }
......
...@@ -6,7 +6,7 @@ message BrokerAction { ...@@ -6,7 +6,7 @@ message BrokerAction {
Register register = 1; Register register = 1;
Audit audit = 2; Audit audit = 2;
InterchainEvent emitInterchainEvent = 3; InterchainEvent emitInterchainEvent = 3;
UpdateEventStatus updateEventStatus =4; UpdateIndex updateIndex =4;
} }
int32 ty = 5; int32 ty = 5;
} }
...@@ -26,43 +26,33 @@ message Audit { ...@@ -26,43 +26,33 @@ message Audit {
// 轮循事件 // 轮循事件
message PollingEvent { message PollingEvent {
string outMeta = 1; Meta meta = 1;
} }
// 更新状态 // 更新跨链事件索引
message UpdateEventStatus { message UpdateIndex {
//源链ID //当前链已经处理到的位置
string index = 1; uint64 sequenceNum = 1;
//状态 0表示开始处理 1表示跨链成功 2表示跨链失败 //目的链服务ID,固定格式0x000001
int32 status = 2; string dstServiceID = 2;
//源链ID,固定格式0x000002
string srcServiceID = 3;
//请求类型 0表示信息流入 1表示信息流出 2表示回滚
uint64 reqType =4;
//响应信息
Response response = 5;
} }
////发布跨链事件
//message EmitInterchainEvent{
// //目的链ID,固定格式0x000001
// string dstChainID = 1;
// //源链ID,固定格式0x000002
// string srcChainID = 2;
// //跨链交易类型 0表示storage,1表示coins,2表示token......
// uint64 reqType =3;
// //调用方法
// string func = 4;
// //参数列表
// repeated string args = 6;
//}
// 跨链事件 // 跨链事件
message InterchainEvent { message InterchainEvent {
//索引值,这个有系统自动生成 //索引值,这个有系统自动生成
uint64 index = 1; uint64 index = 1;
//目的链ID,固定格式0x000001 //目的链ID,固定格式0x000001
string dstChainID = 2; string dstServiceID = 2;
//源链ID,固定格式0x000002 //源链ID,固定格式0x000002
string srcChainID = 3; string srcServiceID = 3;
//跨链交易类型 0表示storage,1表示coins,2表示token...... //跨链交易类型 0表示storage,1表示coins,2表示token......
uint64 reqType =4; uint64 type =4;
//调用方法 //调用方法
string func = 5; string func = 5;
//参数列表 //参数列表
...@@ -76,25 +66,69 @@ message ReceiptBrokerLog{ ...@@ -76,25 +66,69 @@ message ReceiptBrokerLog{
Register register = 1; Register register = 1;
Audit audit = 2; Audit audit = 2;
InterchainEvent emitInterchainEvent = 3; InterchainEvent emitInterchainEvent = 3;
UpdateEventStatus updateEventStatus =4; UpdateIndex updateIndex =4;
} }
int32 ty = 5; int32 ty = 5;
} }
service broker {} service broker {}
//根据状态查看跨链事件
message QueryInterchainEventList { //查询跨出事件
//事件状态必填(默认是0,只查询待处理状态的事件) message QueryInterchainEvent{
int32 status = 1; uint64 index =1;
// 主键索引 //目的链ID,固定格式0x000001
string primaryKey = 2; string dstServiceID = 2;
//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条 //源链ID,固定格式0x000002
int32 count = 3; string srcServiceID = 3;
// 0降序,1升序,默认降序
int32 direction = 4;
} }
//跨链事件列表 //跨链事件列表
message InterchainEventList { message InterChainEventList{
repeated InterchainEvent list = 1; repeated InterchainEvent list =1;
string primaryKey = 2;
} }
////根据状态查看跨链事件
//message QueryInterchainEventList {
// //事件状态必填(默认是0,只查询待处理状态的事件)
// int32 status = 1;
// // 主键索引
// string primaryKey = 2;
// //单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
// int32 count = 3;
// // 0降序,1升序,默认降序
// int32 direction = 4;
//}
////跨链事件列表
//message InterchainEventList {
// repeated InterchainEvent list = 1;
// string primaryKey = 2;
//}
message QueryOutterMeta{
}
message QueryInnerMeta{
}
message QueryInMessage{
string inServicePair = 1;
uint64 sequenceNum = 2;
}
message QueryOutMessage{
string inServicePair = 1;
uint64 sequenceNum = 2;
}
message Meta {
map<string,uint64> meta = 1;
}
message Response{
// A status code that should follow the HTTP status codes.
int32 status = 1;
// A message associated with the response code.
string message = 2;
// A payload that can be used to include metadata with this response.
bytes payload = 3;
}
\ No newline at end of file
...@@ -16,12 +16,12 @@ const ( ...@@ -16,12 +16,12 @@ const (
TyUnknowAction = iota + 100 TyUnknowAction = iota + 100
TyRegisterAction TyRegisterAction
TyAuditAction TyAuditAction
TyUpdateEventStatusAction TyUpdateIndexAction
TyEmitInterchainEventAction TyEmitInterchainEventAction
NameRegisterAction = "Register" NameRegisterAction = "Register"
NameAuditAction = "Audit" NameAuditAction = "Audit"
NameUpdateEventStatusAction = "UpdateEventStatus" NameUpdateIndexAction = "UpdateIndex"
NameEmitInterchainEventAction = "EmitInterchainEvent" NameEmitInterchainEventAction = "EmitInterchainEvent"
) )
...@@ -32,12 +32,27 @@ const ( ...@@ -32,12 +32,27 @@ const (
Req_Type_Token Req_Type_Token
) )
//元数据类型
const (
Meta_Inner = iota
Meta_Outter
Meta_RollBack
)
//元数据类型
const (
Req_Inner = iota
Req_Callback
Req_DstRollback
)
// 跨链事件状态 // 跨链事件状态
const ( const (
Pending = iota Pending = iota
Success Success
Fail Fail
) )
//查询方向 //查询方向
const ( const (
ListDESC = int32(0) ListDESC = int32(0)
...@@ -56,7 +71,7 @@ const ( ...@@ -56,7 +71,7 @@ const (
TyUnknownLog = iota + 100 TyUnknownLog = iota + 100
TyRegisterLog TyRegisterLog
TyAuditLog TyAuditLog
TyUpdateEventStatusLog TyUpdateIndexLog
TyEmitInterchainEventLog TyEmitInterchainEventLog
) )
...@@ -67,7 +82,7 @@ var ( ...@@ -67,7 +82,7 @@ var (
actionMap = map[string]int32{ actionMap = map[string]int32{
NameRegisterAction: TyRegisterAction, NameRegisterAction: TyRegisterAction,
NameAuditAction: TyAuditAction, NameAuditAction: TyAuditAction,
NameUpdateEventStatusAction: TyUpdateEventStatusAction, NameUpdateIndexAction: TyUpdateIndexAction,
NameEmitInterchainEventAction: TyEmitInterchainEventAction, NameEmitInterchainEventAction: TyEmitInterchainEventAction,
} }
//定义log的id和具体log类型及名称,填入具体自定义log类型 //定义log的id和具体log类型及名称,填入具体自定义log类型
......
...@@ -27,7 +27,7 @@ type BrokerAction struct { ...@@ -27,7 +27,7 @@ type BrokerAction struct {
// *BrokerAction_Register // *BrokerAction_Register
// *BrokerAction_Audit // *BrokerAction_Audit
// *BrokerAction_EmitInterchainEvent // *BrokerAction_EmitInterchainEvent
// *BrokerAction_UpdateEventStatus // *BrokerAction_UpdateIndex
Value isBrokerAction_Value `protobuf_oneof:"value"` Value isBrokerAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"` Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
...@@ -76,8 +76,8 @@ type BrokerAction_EmitInterchainEvent struct { ...@@ -76,8 +76,8 @@ type BrokerAction_EmitInterchainEvent struct {
EmitInterchainEvent *InterchainEvent `protobuf:"bytes,3,opt,name=emitInterchainEvent,proto3,oneof"` EmitInterchainEvent *InterchainEvent `protobuf:"bytes,3,opt,name=emitInterchainEvent,proto3,oneof"`
} }
type BrokerAction_UpdateEventStatus struct { type BrokerAction_UpdateIndex struct {
UpdateEventStatus *UpdateEventStatus `protobuf:"bytes,4,opt,name=updateEventStatus,proto3,oneof"` UpdateIndex *UpdateIndex `protobuf:"bytes,4,opt,name=updateIndex,proto3,oneof"`
} }
func (*BrokerAction_Register) isBrokerAction_Value() {} func (*BrokerAction_Register) isBrokerAction_Value() {}
...@@ -86,7 +86,7 @@ func (*BrokerAction_Audit) isBrokerAction_Value() {} ...@@ -86,7 +86,7 @@ func (*BrokerAction_Audit) isBrokerAction_Value() {}
func (*BrokerAction_EmitInterchainEvent) isBrokerAction_Value() {} func (*BrokerAction_EmitInterchainEvent) isBrokerAction_Value() {}
func (*BrokerAction_UpdateEventStatus) isBrokerAction_Value() {} func (*BrokerAction_UpdateIndex) isBrokerAction_Value() {}
func (m *BrokerAction) GetValue() isBrokerAction_Value { func (m *BrokerAction) GetValue() isBrokerAction_Value {
if m != nil { if m != nil {
...@@ -116,9 +116,9 @@ func (m *BrokerAction) GetEmitInterchainEvent() *InterchainEvent { ...@@ -116,9 +116,9 @@ func (m *BrokerAction) GetEmitInterchainEvent() *InterchainEvent {
return nil return nil
} }
func (m *BrokerAction) GetUpdateEventStatus() *UpdateEventStatus { func (m *BrokerAction) GetUpdateIndex() *UpdateIndex {
if x, ok := m.GetValue().(*BrokerAction_UpdateEventStatus); ok { if x, ok := m.GetValue().(*BrokerAction_UpdateIndex); ok {
return x.UpdateEventStatus return x.UpdateIndex
} }
return nil return nil
} }
...@@ -136,7 +136,7 @@ func (*BrokerAction) XXX_OneofWrappers() []interface{} { ...@@ -136,7 +136,7 @@ func (*BrokerAction) XXX_OneofWrappers() []interface{} {
(*BrokerAction_Register)(nil), (*BrokerAction_Register)(nil),
(*BrokerAction_Audit)(nil), (*BrokerAction_Audit)(nil),
(*BrokerAction_EmitInterchainEvent)(nil), (*BrokerAction_EmitInterchainEvent)(nil),
(*BrokerAction_UpdateEventStatus)(nil), (*BrokerAction_UpdateIndex)(nil),
} }
} }
...@@ -233,7 +233,7 @@ func (m *Audit) GetStatus() string { ...@@ -233,7 +233,7 @@ func (m *Audit) GetStatus() string {
// 轮循事件 // 轮循事件
type PollingEvent struct { type PollingEvent struct {
OutMeta string `protobuf:"bytes,1,opt,name=outMeta,proto3" json:"outMeta,omitempty"` Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -264,73 +264,100 @@ func (m *PollingEvent) XXX_DiscardUnknown() { ...@@ -264,73 +264,100 @@ func (m *PollingEvent) XXX_DiscardUnknown() {
var xxx_messageInfo_PollingEvent proto.InternalMessageInfo var xxx_messageInfo_PollingEvent proto.InternalMessageInfo
func (m *PollingEvent) GetOutMeta() string { func (m *PollingEvent) GetMeta() *Meta {
if m != nil { if m != nil {
return m.OutMeta return m.Meta
} }
return "" return nil
} }
// 更新状态 // 更新跨链事件索引
type UpdateEventStatus struct { type UpdateIndex struct {
//源链ID //当前链已经处理到的位置
Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` SequenceNum uint64 `protobuf:"varint,1,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
//状态 0表示开始处理 1表示跨链成功 2表示跨链失败 //目的链服务ID,固定格式0x000001
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` DstServiceID string `protobuf:"bytes,2,opt,name=dstServiceID,proto3" json:"dstServiceID,omitempty"`
//源链ID,固定格式0x000002
SrcServiceID string `protobuf:"bytes,3,opt,name=srcServiceID,proto3" json:"srcServiceID,omitempty"`
//请求类型 0表示信息流入 1表示信息流出 2表示回滚
ReqType uint64 `protobuf:"varint,4,opt,name=reqType,proto3" json:"reqType,omitempty"`
//响应信息
Response *Response `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
} }
func (m *UpdateEventStatus) Reset() { *m = UpdateEventStatus{} } func (m *UpdateIndex) Reset() { *m = UpdateIndex{} }
func (m *UpdateEventStatus) String() string { return proto.CompactTextString(m) } func (m *UpdateIndex) String() string { return proto.CompactTextString(m) }
func (*UpdateEventStatus) ProtoMessage() {} func (*UpdateIndex) ProtoMessage() {}
func (*UpdateEventStatus) Descriptor() ([]byte, []int) { func (*UpdateIndex) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{4} return fileDescriptor_f209535e190f2bed, []int{4}
} }
func (m *UpdateEventStatus) XXX_Unmarshal(b []byte) error { func (m *UpdateIndex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateEventStatus.Unmarshal(m, b) return xxx_messageInfo_UpdateIndex.Unmarshal(m, b)
} }
func (m *UpdateEventStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *UpdateIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateEventStatus.Marshal(b, m, deterministic) return xxx_messageInfo_UpdateIndex.Marshal(b, m, deterministic)
} }
func (m *UpdateEventStatus) XXX_Merge(src proto.Message) { func (m *UpdateIndex) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateEventStatus.Merge(m, src) xxx_messageInfo_UpdateIndex.Merge(m, src)
} }
func (m *UpdateEventStatus) XXX_Size() int { func (m *UpdateIndex) XXX_Size() int {
return xxx_messageInfo_UpdateEventStatus.Size(m) return xxx_messageInfo_UpdateIndex.Size(m)
} }
func (m *UpdateEventStatus) XXX_DiscardUnknown() { func (m *UpdateIndex) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateEventStatus.DiscardUnknown(m) xxx_messageInfo_UpdateIndex.DiscardUnknown(m)
} }
var xxx_messageInfo_UpdateEventStatus proto.InternalMessageInfo var xxx_messageInfo_UpdateIndex proto.InternalMessageInfo
func (m *UpdateEventStatus) GetIndex() string { func (m *UpdateIndex) GetSequenceNum() uint64 {
if m != nil { if m != nil {
return m.Index return m.SequenceNum
}
return 0
}
func (m *UpdateIndex) GetDstServiceID() string {
if m != nil {
return m.DstServiceID
} }
return "" return ""
} }
func (m *UpdateEventStatus) GetStatus() int32 { func (m *UpdateIndex) GetSrcServiceID() string {
if m != nil { if m != nil {
return m.Status return m.SrcServiceID
}
return ""
}
func (m *UpdateIndex) GetReqType() uint64 {
if m != nil {
return m.ReqType
} }
return 0 return 0
} }
func (m *UpdateIndex) GetResponse() *Response {
if m != nil {
return m.Response
}
return nil
}
// 跨链事件 // 跨链事件
type InterchainEvent struct { type InterchainEvent struct {
//索引值,这个有系统自动生成 //索引值,这个有系统自动生成
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
//目的链ID,固定格式0x000001 //目的链ID,固定格式0x000001
DstChainID string `protobuf:"bytes,2,opt,name=dstChainID,proto3" json:"dstChainID,omitempty"` DstServiceID string `protobuf:"bytes,2,opt,name=dstServiceID,proto3" json:"dstServiceID,omitempty"`
//源链ID,固定格式0x000002 //源链ID,固定格式0x000002
SrcChainID string `protobuf:"bytes,3,opt,name=srcChainID,proto3" json:"srcChainID,omitempty"` SrcServiceID string `protobuf:"bytes,3,opt,name=srcServiceID,proto3" json:"srcServiceID,omitempty"`
//跨链交易类型 0表示storage,1表示coins,2表示token...... //跨链交易类型 0表示storage,1表示coins,2表示token......
ReqType uint64 `protobuf:"varint,4,opt,name=reqType,proto3" json:"reqType,omitempty"` Type uint64 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"`
//调用方法 //调用方法
Func string `protobuf:"bytes,5,opt,name=func,proto3" json:"func,omitempty"` Func string `protobuf:"bytes,5,opt,name=func,proto3" json:"func,omitempty"`
//参数列表 //参数列表
...@@ -374,23 +401,23 @@ func (m *InterchainEvent) GetIndex() uint64 { ...@@ -374,23 +401,23 @@ func (m *InterchainEvent) GetIndex() uint64 {
return 0 return 0
} }
func (m *InterchainEvent) GetDstChainID() string { func (m *InterchainEvent) GetDstServiceID() string {
if m != nil { if m != nil {
return m.DstChainID return m.DstServiceID
} }
return "" return ""
} }
func (m *InterchainEvent) GetSrcChainID() string { func (m *InterchainEvent) GetSrcServiceID() string {
if m != nil { if m != nil {
return m.SrcChainID return m.SrcServiceID
} }
return "" return ""
} }
func (m *InterchainEvent) GetReqType() uint64 { func (m *InterchainEvent) GetType() uint64 {
if m != nil { if m != nil {
return m.ReqType return m.Type
} }
return 0 return 0
} }
...@@ -422,7 +449,7 @@ type ReceiptBrokerLog struct { ...@@ -422,7 +449,7 @@ type ReceiptBrokerLog struct {
// *ReceiptBrokerLog_Register // *ReceiptBrokerLog_Register
// *ReceiptBrokerLog_Audit // *ReceiptBrokerLog_Audit
// *ReceiptBrokerLog_EmitInterchainEvent // *ReceiptBrokerLog_EmitInterchainEvent
// *ReceiptBrokerLog_UpdateEventStatus // *ReceiptBrokerLog_UpdateIndex
Value isReceiptBrokerLog_Value `protobuf_oneof:"value"` Value isReceiptBrokerLog_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"` Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
...@@ -471,8 +498,8 @@ type ReceiptBrokerLog_EmitInterchainEvent struct { ...@@ -471,8 +498,8 @@ type ReceiptBrokerLog_EmitInterchainEvent struct {
EmitInterchainEvent *InterchainEvent `protobuf:"bytes,3,opt,name=emitInterchainEvent,proto3,oneof"` EmitInterchainEvent *InterchainEvent `protobuf:"bytes,3,opt,name=emitInterchainEvent,proto3,oneof"`
} }
type ReceiptBrokerLog_UpdateEventStatus struct { type ReceiptBrokerLog_UpdateIndex struct {
UpdateEventStatus *UpdateEventStatus `protobuf:"bytes,4,opt,name=updateEventStatus,proto3,oneof"` UpdateIndex *UpdateIndex `protobuf:"bytes,4,opt,name=updateIndex,proto3,oneof"`
} }
func (*ReceiptBrokerLog_Register) isReceiptBrokerLog_Value() {} func (*ReceiptBrokerLog_Register) isReceiptBrokerLog_Value() {}
...@@ -481,7 +508,7 @@ func (*ReceiptBrokerLog_Audit) isReceiptBrokerLog_Value() {} ...@@ -481,7 +508,7 @@ func (*ReceiptBrokerLog_Audit) isReceiptBrokerLog_Value() {}
func (*ReceiptBrokerLog_EmitInterchainEvent) isReceiptBrokerLog_Value() {} func (*ReceiptBrokerLog_EmitInterchainEvent) isReceiptBrokerLog_Value() {}
func (*ReceiptBrokerLog_UpdateEventStatus) isReceiptBrokerLog_Value() {} func (*ReceiptBrokerLog_UpdateIndex) isReceiptBrokerLog_Value() {}
func (m *ReceiptBrokerLog) GetValue() isReceiptBrokerLog_Value { func (m *ReceiptBrokerLog) GetValue() isReceiptBrokerLog_Value {
if m != nil { if m != nil {
...@@ -511,9 +538,9 @@ func (m *ReceiptBrokerLog) GetEmitInterchainEvent() *InterchainEvent { ...@@ -511,9 +538,9 @@ func (m *ReceiptBrokerLog) GetEmitInterchainEvent() *InterchainEvent {
return nil return nil
} }
func (m *ReceiptBrokerLog) GetUpdateEventStatus() *UpdateEventStatus { func (m *ReceiptBrokerLog) GetUpdateIndex() *UpdateIndex {
if x, ok := m.GetValue().(*ReceiptBrokerLog_UpdateEventStatus); ok { if x, ok := m.GetValue().(*ReceiptBrokerLog_UpdateIndex); ok {
return x.UpdateEventStatus return x.UpdateIndex
} }
return nil return nil
} }
...@@ -531,136 +558,394 @@ func (*ReceiptBrokerLog) XXX_OneofWrappers() []interface{} { ...@@ -531,136 +558,394 @@ func (*ReceiptBrokerLog) XXX_OneofWrappers() []interface{} {
(*ReceiptBrokerLog_Register)(nil), (*ReceiptBrokerLog_Register)(nil),
(*ReceiptBrokerLog_Audit)(nil), (*ReceiptBrokerLog_Audit)(nil),
(*ReceiptBrokerLog_EmitInterchainEvent)(nil), (*ReceiptBrokerLog_EmitInterchainEvent)(nil),
(*ReceiptBrokerLog_UpdateEventStatus)(nil), (*ReceiptBrokerLog_UpdateIndex)(nil),
} }
} }
//根据状态查看跨链事件 //查询跨出事件
type QueryInterchainEventList struct { type QueryInterchainEvent struct {
//事件状态必填(默认是0,只查询待处理状态的事件) Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` //目的链ID,固定格式0x000001
// 主键索引 DstServiceID string `protobuf:"bytes,2,opt,name=dstServiceID,proto3" json:"dstServiceID,omitempty"`
PrimaryKey string `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"` //源链ID,固定格式0x000002
//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条 SrcServiceID string `protobuf:"bytes,3,opt,name=srcServiceID,proto3" json:"srcServiceID,omitempty"`
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
// 0降序,1升序,默认降序
Direction int32 `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
} }
func (m *QueryInterchainEventList) Reset() { *m = QueryInterchainEventList{} } func (m *QueryInterchainEvent) Reset() { *m = QueryInterchainEvent{} }
func (m *QueryInterchainEventList) String() string { return proto.CompactTextString(m) } func (m *QueryInterchainEvent) String() string { return proto.CompactTextString(m) }
func (*QueryInterchainEventList) ProtoMessage() {} func (*QueryInterchainEvent) ProtoMessage() {}
func (*QueryInterchainEventList) Descriptor() ([]byte, []int) { func (*QueryInterchainEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{7} return fileDescriptor_f209535e190f2bed, []int{7}
} }
func (m *QueryInterchainEventList) XXX_Unmarshal(b []byte) error { func (m *QueryInterchainEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInterchainEventList.Unmarshal(m, b) return xxx_messageInfo_QueryInterchainEvent.Unmarshal(m, b)
} }
func (m *QueryInterchainEventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QueryInterchainEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInterchainEventList.Marshal(b, m, deterministic) return xxx_messageInfo_QueryInterchainEvent.Marshal(b, m, deterministic)
} }
func (m *QueryInterchainEventList) XXX_Merge(src proto.Message) { func (m *QueryInterchainEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInterchainEventList.Merge(m, src) xxx_messageInfo_QueryInterchainEvent.Merge(m, src)
} }
func (m *QueryInterchainEventList) XXX_Size() int { func (m *QueryInterchainEvent) XXX_Size() int {
return xxx_messageInfo_QueryInterchainEventList.Size(m) return xxx_messageInfo_QueryInterchainEvent.Size(m)
} }
func (m *QueryInterchainEventList) XXX_DiscardUnknown() { func (m *QueryInterchainEvent) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInterchainEventList.DiscardUnknown(m) xxx_messageInfo_QueryInterchainEvent.DiscardUnknown(m)
} }
var xxx_messageInfo_QueryInterchainEventList proto.InternalMessageInfo var xxx_messageInfo_QueryInterchainEvent proto.InternalMessageInfo
func (m *QueryInterchainEventList) GetStatus() int32 { func (m *QueryInterchainEvent) GetIndex() uint64 {
if m != nil { if m != nil {
return m.Status return m.Index
} }
return 0 return 0
} }
func (m *QueryInterchainEventList) GetPrimaryKey() string { func (m *QueryInterchainEvent) GetDstServiceID() string {
if m != nil { if m != nil {
return m.PrimaryKey return m.DstServiceID
} }
return "" return ""
} }
func (m *QueryInterchainEventList) GetCount() int32 { func (m *QueryInterchainEvent) GetSrcServiceID() string {
if m != nil {
return m.SrcServiceID
}
return ""
}
//跨链事件列表
type InterChainEventList struct {
List []*InterchainEvent `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InterChainEventList) Reset() { *m = InterChainEventList{} }
func (m *InterChainEventList) String() string { return proto.CompactTextString(m) }
func (*InterChainEventList) ProtoMessage() {}
func (*InterChainEventList) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{8}
}
func (m *InterChainEventList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InterChainEventList.Unmarshal(m, b)
}
func (m *InterChainEventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InterChainEventList.Marshal(b, m, deterministic)
}
func (m *InterChainEventList) XXX_Merge(src proto.Message) {
xxx_messageInfo_InterChainEventList.Merge(m, src)
}
func (m *InterChainEventList) XXX_Size() int {
return xxx_messageInfo_InterChainEventList.Size(m)
}
func (m *InterChainEventList) XXX_DiscardUnknown() {
xxx_messageInfo_InterChainEventList.DiscardUnknown(m)
}
var xxx_messageInfo_InterChainEventList proto.InternalMessageInfo
func (m *InterChainEventList) GetList() []*InterchainEvent {
if m != nil { if m != nil {
return m.Count return m.List
}
return nil
}
////根据状态查看跨链事件
//message QueryInterchainEventList {
// //事件状态必填(默认是0,只查询待处理状态的事件)
// int32 status = 1;
// // 主键索引
// string primaryKey = 2;
// //单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
// int32 count = 3;
// // 0降序,1升序,默认降序
// int32 direction = 4;
//}
////跨链事件列表
//message InterchainEventList {
// repeated InterchainEvent list = 1;
// string primaryKey = 2;
//}
type QueryOutterMeta struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryOutterMeta) Reset() { *m = QueryOutterMeta{} }
func (m *QueryOutterMeta) String() string { return proto.CompactTextString(m) }
func (*QueryOutterMeta) ProtoMessage() {}
func (*QueryOutterMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{9}
}
func (m *QueryOutterMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOutterMeta.Unmarshal(m, b)
}
func (m *QueryOutterMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryOutterMeta.Marshal(b, m, deterministic)
}
func (m *QueryOutterMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryOutterMeta.Merge(m, src)
}
func (m *QueryOutterMeta) XXX_Size() int {
return xxx_messageInfo_QueryOutterMeta.Size(m)
}
func (m *QueryOutterMeta) XXX_DiscardUnknown() {
xxx_messageInfo_QueryOutterMeta.DiscardUnknown(m)
}
var xxx_messageInfo_QueryOutterMeta proto.InternalMessageInfo
type QueryInnerMeta struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryInnerMeta) Reset() { *m = QueryInnerMeta{} }
func (m *QueryInnerMeta) String() string { return proto.CompactTextString(m) }
func (*QueryInnerMeta) ProtoMessage() {}
func (*QueryInnerMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{10}
}
func (m *QueryInnerMeta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInnerMeta.Unmarshal(m, b)
}
func (m *QueryInnerMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInnerMeta.Marshal(b, m, deterministic)
}
func (m *QueryInnerMeta) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInnerMeta.Merge(m, src)
}
func (m *QueryInnerMeta) XXX_Size() int {
return xxx_messageInfo_QueryInnerMeta.Size(m)
}
func (m *QueryInnerMeta) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInnerMeta.DiscardUnknown(m)
}
var xxx_messageInfo_QueryInnerMeta proto.InternalMessageInfo
type QueryInMessage struct {
InServicePair string `protobuf:"bytes,1,opt,name=inServicePair,proto3" json:"inServicePair,omitempty"`
SequenceNum uint64 `protobuf:"varint,2,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryInMessage) Reset() { *m = QueryInMessage{} }
func (m *QueryInMessage) String() string { return proto.CompactTextString(m) }
func (*QueryInMessage) ProtoMessage() {}
func (*QueryInMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{11}
}
func (m *QueryInMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInMessage.Unmarshal(m, b)
}
func (m *QueryInMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInMessage.Marshal(b, m, deterministic)
}
func (m *QueryInMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInMessage.Merge(m, src)
}
func (m *QueryInMessage) XXX_Size() int {
return xxx_messageInfo_QueryInMessage.Size(m)
}
func (m *QueryInMessage) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInMessage.DiscardUnknown(m)
}
var xxx_messageInfo_QueryInMessage proto.InternalMessageInfo
func (m *QueryInMessage) GetInServicePair() string {
if m != nil {
return m.InServicePair
}
return ""
}
func (m *QueryInMessage) GetSequenceNum() uint64 {
if m != nil {
return m.SequenceNum
} }
return 0 return 0
} }
func (m *QueryInterchainEventList) GetDirection() int32 { type QueryOutMessage struct {
InServicePair string `protobuf:"bytes,1,opt,name=inServicePair,proto3" json:"inServicePair,omitempty"`
SequenceNum uint64 `protobuf:"varint,2,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryOutMessage) Reset() { *m = QueryOutMessage{} }
func (m *QueryOutMessage) String() string { return proto.CompactTextString(m) }
func (*QueryOutMessage) ProtoMessage() {}
func (*QueryOutMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{12}
}
func (m *QueryOutMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOutMessage.Unmarshal(m, b)
}
func (m *QueryOutMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryOutMessage.Marshal(b, m, deterministic)
}
func (m *QueryOutMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryOutMessage.Merge(m, src)
}
func (m *QueryOutMessage) XXX_Size() int {
return xxx_messageInfo_QueryOutMessage.Size(m)
}
func (m *QueryOutMessage) XXX_DiscardUnknown() {
xxx_messageInfo_QueryOutMessage.DiscardUnknown(m)
}
var xxx_messageInfo_QueryOutMessage proto.InternalMessageInfo
func (m *QueryOutMessage) GetInServicePair() string {
if m != nil {
return m.InServicePair
}
return ""
}
func (m *QueryOutMessage) GetSequenceNum() uint64 {
if m != nil { if m != nil {
return m.Direction return m.SequenceNum
} }
return 0 return 0
} }
//跨链事件列表 type Meta struct {
type InterchainEventList struct { Meta map[string]uint64 `protobuf:"bytes,1,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
List []*InterchainEvent `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
PrimaryKey string `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
} }
func (m *InterchainEventList) Reset() { *m = InterchainEventList{} } func (m *Meta) Reset() { *m = Meta{} }
func (m *InterchainEventList) String() string { return proto.CompactTextString(m) } func (m *Meta) String() string { return proto.CompactTextString(m) }
func (*InterchainEventList) ProtoMessage() {} func (*Meta) ProtoMessage() {}
func (*InterchainEventList) Descriptor() ([]byte, []int) { func (*Meta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{8} return fileDescriptor_f209535e190f2bed, []int{13}
} }
func (m *InterchainEventList) XXX_Unmarshal(b []byte) error { func (m *Meta) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InterchainEventList.Unmarshal(m, b) return xxx_messageInfo_Meta.Unmarshal(m, b)
} }
func (m *InterchainEventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InterchainEventList.Marshal(b, m, deterministic) return xxx_messageInfo_Meta.Marshal(b, m, deterministic)
} }
func (m *InterchainEventList) XXX_Merge(src proto.Message) { func (m *Meta) XXX_Merge(src proto.Message) {
xxx_messageInfo_InterchainEventList.Merge(m, src) xxx_messageInfo_Meta.Merge(m, src)
} }
func (m *InterchainEventList) XXX_Size() int { func (m *Meta) XXX_Size() int {
return xxx_messageInfo_InterchainEventList.Size(m) return xxx_messageInfo_Meta.Size(m)
} }
func (m *InterchainEventList) XXX_DiscardUnknown() { func (m *Meta) XXX_DiscardUnknown() {
xxx_messageInfo_InterchainEventList.DiscardUnknown(m) xxx_messageInfo_Meta.DiscardUnknown(m)
} }
var xxx_messageInfo_InterchainEventList proto.InternalMessageInfo var xxx_messageInfo_Meta proto.InternalMessageInfo
func (m *InterchainEventList) GetList() []*InterchainEvent { func (m *Meta) GetMeta() map[string]uint64 {
if m != nil { if m != nil {
return m.List return m.Meta
} }
return nil return nil
} }
func (m *InterchainEventList) GetPrimaryKey() string { type Response struct {
// A status code that should follow the HTTP status codes.
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
// A message associated with the response code.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// A payload that can be used to include metadata with this response.
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{14}
}
func (m *Response) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Response.Unmarshal(m, b)
}
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
}
func (m *Response) XXX_Merge(src proto.Message) {
xxx_messageInfo_Response.Merge(m, src)
}
func (m *Response) XXX_Size() int {
return xxx_messageInfo_Response.Size(m)
}
func (m *Response) XXX_DiscardUnknown() {
xxx_messageInfo_Response.DiscardUnknown(m)
}
var xxx_messageInfo_Response proto.InternalMessageInfo
func (m *Response) GetStatus() int32 {
if m != nil { if m != nil {
return m.PrimaryKey return m.Status
}
return 0
}
func (m *Response) GetMessage() string {
if m != nil {
return m.Message
} }
return "" return ""
} }
func (m *Response) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() { func init() {
proto.RegisterType((*BrokerAction)(nil), "types.BrokerAction") proto.RegisterType((*BrokerAction)(nil), "types.BrokerAction")
proto.RegisterType((*Register)(nil), "types.Register") proto.RegisterType((*Register)(nil), "types.Register")
proto.RegisterType((*Audit)(nil), "types.Audit") proto.RegisterType((*Audit)(nil), "types.Audit")
proto.RegisterType((*PollingEvent)(nil), "types.PollingEvent") proto.RegisterType((*PollingEvent)(nil), "types.PollingEvent")
proto.RegisterType((*UpdateEventStatus)(nil), "types.UpdateEventStatus") proto.RegisterType((*UpdateIndex)(nil), "types.UpdateIndex")
proto.RegisterType((*InterchainEvent)(nil), "types.InterchainEvent") proto.RegisterType((*InterchainEvent)(nil), "types.InterchainEvent")
proto.RegisterType((*ReceiptBrokerLog)(nil), "types.ReceiptBrokerLog") proto.RegisterType((*ReceiptBrokerLog)(nil), "types.ReceiptBrokerLog")
proto.RegisterType((*QueryInterchainEventList)(nil), "types.QueryInterchainEventList") proto.RegisterType((*QueryInterchainEvent)(nil), "types.QueryInterchainEvent")
proto.RegisterType((*InterchainEventList)(nil), "types.InterchainEventList") proto.RegisterType((*InterChainEventList)(nil), "types.InterChainEventList")
proto.RegisterType((*QueryOutterMeta)(nil), "types.QueryOutterMeta")
proto.RegisterType((*QueryInnerMeta)(nil), "types.QueryInnerMeta")
proto.RegisterType((*QueryInMessage)(nil), "types.QueryInMessage")
proto.RegisterType((*QueryOutMessage)(nil), "types.QueryOutMessage")
proto.RegisterType((*Meta)(nil), "types.Meta")
proto.RegisterMapType((map[string]uint64)(nil), "types.Meta.MetaEntry")
proto.RegisterType((*Response)(nil), "types.Response")
} }
func init() { func init() {
...@@ -668,38 +953,47 @@ func init() { ...@@ -668,38 +953,47 @@ func init() {
} }
var fileDescriptor_f209535e190f2bed = []byte{ var fileDescriptor_f209535e190f2bed = []byte{
// 491 bytes of a gzipped FileDescriptorProto // 629 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0x5d, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x4d, 0x6f, 0xd3, 0x4c,
0x10, 0x8e, 0x9d, 0x6c, 0x7e, 0xa6, 0x11, 0xa5, 0x5b, 0x54, 0xed, 0x03, 0x42, 0x96, 0xc5, 0x43, 0x10, 0x8e, 0x13, 0x3b, 0x4d, 0x26, 0x79, 0xdb, 0xbe, 0xdb, 0x52, 0x59, 0x5c, 0x88, 0xac, 0x1e,
0x84, 0xc0, 0x48, 0xe5, 0x04, 0x09, 0x20, 0xb9, 0x50, 0x10, 0x2c, 0xf0, 0xc2, 0xdb, 0xd6, 0x1e, 0xca, 0x57, 0x2a, 0x15, 0x09, 0x10, 0xb7, 0x14, 0x2a, 0xa5, 0xa8, 0x2d, 0x65, 0xf9, 0x10, 0x70,
0xc2, 0x8a, 0xc4, 0x36, 0xeb, 0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c4, 0xa8, 0xa2, 0x9c, 0x29, 0x37, 0x1f, 0x41, 0x7b, 0x0e,
0xb1, 0x55, 0x68, 0x9c, 0x62, 0xe1, 0xbc, 0xdb, 0xa5, 0x6d, 0x26, 0x75, 0xdb, 0x79, 0x2b, 0x8d,
0x27, 0xf5, 0xc7, 0x5e, 0xf4, 0xd6, 0x8e, 0xcb, 0x52, 0xd7, 0x15, 0xa5, 0x78, 0x55, 0xa5, 0xd8,
0xb1, 0x31, 0x2d, 0x53, 0x74, 0xfd, 0x9e, 0x99, 0x76, 0x27, 0x13, 0xc5, 0x24, 0x15, 0x23, 0xea,
0x72, 0x97, 0xcf, 0xcc, 0x9d, 0x16, 0x34, 0xcb, 0x1f, 0xd4, 0x2e, 0x7c, 0x68, 0xf5, 0xfb, 0xdb,
0x14, 0xfb, 0x49, 0x93, 0xfe, 0x56, 0x0f, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xf6, 0xd8,
0x9f, 0xbd, 0x06, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment