Commit d2ef4bda authored by hezhengjun's avatar hezhengjun Committed by vipwzw

correct statics

parent a55e9787
......@@ -3,6 +3,7 @@
# shellcheck source=/dev/null
source "./dockerRelayerTest.sh"
#source "./dockerRelayerTestInfinite.sh"
source "./paracrosstestcase.sh"
function cross2eth() {
......
......@@ -22,13 +22,14 @@ func StaticsCmd() *cobra.Command {
//ShowLockStaticsFlags ...
func ShowStaticsFlags(cmd *cobra.Command) {
cmd.Flags().StringP("symbol", "s", "", "token symbol")
_ = cmd.MarkFlagRequired("symbol")
cmd.Flags().StringP("symbol", "s", "", "token symbol(optional)")
cmd.Flags().Int32P("from", "f", 0, "source chain, 0=ethereum, and 1=chain33")
_ = cmd.MarkFlagRequired("from")
cmd.Flags().Int32P("operation", "o", 0, "operation type, 1=burn, and 2=lock")
_ = cmd.MarkFlagRequired("operation")
cmd.Flags().Int32P("status", "u", 0, "show with specified status, default to show all, 1=pending, 2=failed, 3=successful")
cmd.Flags().Int32P("status", "u", 0, "show with specified status, default to show all, 1=pending, 2=successful, 3=failed")
cmd.Flags().Int32P("count", "n", 0, "count to show, default to show all")
cmd.Flags().Int32P("index", "i", 0, "tx index(optional, exclude, default from 0)")
}
//ShowLockStatics ...
......@@ -38,6 +39,8 @@ func ShowStatics(cmd *cobra.Command, args []string) {
from, _ := cmd.Flags().GetInt32("from")
operation, _ := cmd.Flags().GetInt32("operation")
status, _ := cmd.Flags().GetInt32("status")
count, _ := cmd.Flags().GetInt32("count")
index, _ := cmd.Flags().GetInt32("index")
if from != 0 && 1 != from {
fmt.Println("Pls set correct source chain flag, 0=ethereum, and 1=chain33")
......@@ -50,15 +53,17 @@ func ShowStatics(cmd *cobra.Command, args []string) {
}
if status < 0 || status > 3 {
fmt.Println("Pls set correct status, default 0 to show all, 1=pending, 2=failed, 3=successful")
fmt.Println("Pls set correct status, default 0 to show all, 1=pending, 2=successful, 3=failed")
return
}
para := ebTypes.TokenStaticsRequest{
para := &ebTypes.TokenStaticsRequest{
Symbol: symbol,
From: from,
Operation: operation,
Status: status,
TxIndex: int64(index),
Count: count,
}
var res ebTypes.TokenStaticsResponse
ctx := jsonclient.NewRPCCtx(rpcLaddr, "Manager.ShowTokenStatics", para, &res)
......
syntax = "proto3";
package types;
option go_package = "../types";
message SyncTxConfig {
string chain33host = 1;
......
syntax = "proto3";
package types;
option go_package = "../types";
//以太坊账户信息
// privkey : 账户地址对应的私钥
......@@ -159,6 +160,7 @@ message Chain33ToEthereumStatics {
string amount = 8;
int64 nonce = 9;
int64 txIndex = 10;
string operationType = 11;
}
message Ethereum2Chain33Statics {
......@@ -174,6 +176,7 @@ message Ethereum2Chain33Statics {
string amount = 8;
int64 nonce = 9;
int64 txIndex = 10;
string operationType = 11;
}
message TokenAddress {
......@@ -192,6 +195,7 @@ message TokenStaticsRequest {
int32 operation = 3;
int32 status = 4;
int64 txIndex = 5;
int32 count = 6;
}
message TokenStaticsResponse {
......
......@@ -53,7 +53,7 @@ type Relayer4Chain33 struct {
bridgeBankEventBurnSig string
bridgeBankAbi abi.ABI
deployInfo *ebTypes.Deploy
totalTx4Chain33ToEth int64
totalTx4RelayEth2chai33 int64
//新增//
ethBridgeClaimChan <-chan *ebTypes.EthBridgeClaim
chain33MsgChan chan<- *events.Chain33Msg
......@@ -80,19 +80,19 @@ type Chain33StartPara struct {
// StartChain33Relayer : initializes a relayer which witnesses events on the chain33 network and relays them to Ethereum
func StartChain33Relayer(startPara *Chain33StartPara) *Relayer4Chain33 {
chain33Relayer := &Relayer4Chain33{
rpcLaddr: startPara.SyncTxConfig.Chain33Host,
chainName: startPara.ChainName,
chainID: startPara.ChainID,
fetchHeightPeriodMs: startPara.SyncTxConfig.FetchHeightPeriodMs,
unlockChan: make(chan int),
db: startPara.DBHandle,
ctx: startPara.Ctx,
deployInfo: startPara.DeployInfo,
bridgeRegistryAddr: startPara.BridgeRegistryAddr,
ethBridgeClaimChan: startPara.EthBridgeClaimChan,
chain33MsgChan: startPara.Chain33MsgChan,
totalTx4Chain33ToEth: 0,
symbol2Addr: make(map[string]string),
rpcLaddr: startPara.SyncTxConfig.Chain33Host,
chainName: startPara.ChainName,
chainID: startPara.ChainID,
fetchHeightPeriodMs: startPara.SyncTxConfig.FetchHeightPeriodMs,
unlockChan: make(chan int),
db: startPara.DBHandle,
ctx: startPara.Ctx,
deployInfo: startPara.DeployInfo,
bridgeRegistryAddr: startPara.BridgeRegistryAddr,
ethBridgeClaimChan: startPara.EthBridgeClaimChan,
chain33MsgChan: startPara.Chain33MsgChan,
totalTx4RelayEth2chai33: 0,
symbol2Addr: make(map[string]string),
}
syncCfg := &ebTypes.SyncTxReceiptConfig{
......@@ -115,17 +115,18 @@ func StartChain33Relayer(startPara *Chain33StartPara) *Relayer4Chain33 {
//输入地址为空,且数据库中保存地址不为空,则直接使用数据库中的地址
chain33Relayer.bridgeRegistryAddr = registrAddrInDB
}
chain33Relayer.totalTx4RelayEth2chai33 = chain33Relayer.getTotalTxAmount()
if 0 == chain33Relayer.totalTx4RelayEth2chai33 {
statics := &ebTypes.Ethereum2Chain33Statics{}
data := chain33Types.Encode(statics)
chain33Relayer.setLastestRelay2Chain33TxStatics(0, int32(events.ClaimTypeLock), data)
chain33Relayer.setLastestRelay2Chain33TxStatics(0, int32(events.ClaimTypeBurn), data)
}
go chain33Relayer.syncProc(syncCfg)
return chain33Relayer
}
//QueryTxhashRelay2Eth ...
func (chain33Relayer *Relayer4Chain33) QueryTxhashRelay2Eth() ebTypes.Txhashes {
txhashs := utils.QueryTxhashes([]byte(eth2Chain33BurnLockTxStaticsPrefix), chain33Relayer.db)
return ebTypes.Txhashes{Txhash: txhashs}
}
func (chain33Relayer *Relayer4Chain33) syncProc(syncCfg *ebTypes.SyncTxReceiptConfig) {
_, _ = fmt.Fprintln(os.Stdout, "Pls unlock or import private key for Chain33 relayer")
<-chain33Relayer.unlockChan
......@@ -186,6 +187,7 @@ func (chain33Relayer *Relayer4Chain33) getCurrentHeight() int64 {
func (chain33Relayer *Relayer4Chain33) onNewHeightProc(currentHeight int64) {
//检查已经提交的交易结果
chain33Relayer.updateTxStatus()
//未达到足够的成熟度,不进行处理
// +++++++++||++++++++++++||++++++++++||
......@@ -368,8 +370,10 @@ func (chain33Relayer *Relayer4Chain33) relayLockBurnToChain33(claim *ebTypes.Eth
}
var tokenAddr string
operationType := ""
if int32(events.ClaimTypeBurn) == claim.ClaimType {
//burn 分支
operationType = "Burn"
if ebTypes.SYMBOL_BTY == claim.Symbol {
tokenAddr = ebTypes.BTYAddrChain33
} else {
......@@ -379,9 +383,9 @@ func (chain33Relayer *Relayer4Chain33) relayLockBurnToChain33(claim *ebTypes.Eth
return
}
}
} else {
//lock 分支
operationType = "Lock"
var exist bool
tokenAddr, exist = chain33Relayer.symbol2Addr[claim.Symbol]
if !exist {
......@@ -424,18 +428,17 @@ func (chain33Relayer *Relayer4Chain33) relayLockBurnToChain33(claim *ebTypes.Eth
claim.ChainName = chain33Relayer.chainName
txhash, err := relayEvmTx2Chain33(chain33Relayer.privateKey4Chain33, claim, parameter, chain33Relayer.rpcLaddr, chain33Relayer.oracleAddr)
if err != nil {
relayerLog.Error("relayLockBurnToChain33", "Failed to RelayEvmTx2Chain33 due to:", err.Error())
relayerLog.Error("relayLockBurnToChain33", "Failed to RelayEvmTx2Chain33 due to:", err.Error(), "EthereumTxhash", claim.EthTxHash)
return
}
relayerLog.Info("relayLockBurnToChain33", "tx is sent to relay lock or burn with hash", txhash)
//保存交易hash,方便查询
atomic.AddInt64(&chain33Relayer.totalTx4Chain33ToEth, 1)
txIndex := atomic.LoadInt64(&chain33Relayer.totalTx4Chain33ToEth)
//第一个有效的index从1开始,方便list
txIndex := atomic.AddInt64(&chain33Relayer.totalTx4RelayEth2chai33, 1)
if err = chain33Relayer.updateTotalTxAmount2Eth(txIndex); nil != err {
relayerLog.Error("relayLockBurnToChain33", "Failed to RelayEvmTx2Chain33 due to:", err.Error())
relayerLog.Error("relayLockBurnToChain33", "Failed to updateTotalTxAmount2Eth due to:", err.Error())
return
}
statics := &ebTypes.Ethereum2Chain33Statics{
Chain33Txstatus: ebTypes.Tx_Status_Pending,
Chain33Txhash: txhash,
......@@ -447,12 +450,22 @@ func (chain33Relayer *Relayer4Chain33) relayLockBurnToChain33(claim *ebTypes.Eth
Amount: claim.Amount,
Nonce: claim.Nonce,
TxIndex: txIndex,
OperationType: operationType,
}
data := chain33Types.Encode(statics)
if err = chain33Relayer.setLastestRelay2Chain33TxStatics(txIndex, claim.ClaimType, data); nil != err {
relayerLog.Error("relayLockBurnToChain33", "Failed to RelayEvmTx2Chain33 due to:", err.Error())
relayerLog.Error("relayLockBurnToChain33", "Failed to setLastestRelay2Chain33TxStatics due to:", err.Error())
return
}
relayerLog.Info("relayLockBurnToChain33::successful",
"txIndex", txIndex,
"Chain33Txhash", txhash,
"EthereumTxhash", claim.EthTxHash,
"type", operationType,
"Symbol", claim.Symbol,
"Amount", claim.Amount,
"EthereumSender", claim.EthereumSender,
"Chain33Receiver", claim.Chain33Receiver)
}
func (chain33Relayer *Relayer4Chain33) BurnAsyncFromChain33(ownerPrivateKey, tokenAddr, ethereumReceiver, amount string) (string, error) {
......@@ -476,10 +489,10 @@ func (chain33Relayer *Relayer4Chain33) ShowBridgeRegistryAddr() (string, error)
return chain33Relayer.bridgeRegistryAddr, nil
}
func (chain33Relayer *Relayer4Chain33) ShowStatics(request ebTypes.TokenStaticsRequest) (*ebTypes.TokenStaticsResponse, error) {
func (chain33Relayer *Relayer4Chain33) ShowStatics(request *ebTypes.TokenStaticsRequest) (*ebTypes.TokenStaticsResponse, error) {
res := &ebTypes.TokenStaticsResponse{}
datas, err := chain33Relayer.getStatics(request.Operation, request.TxIndex)
datas, err := chain33Relayer.getStatics(request.Operation, request.TxIndex, request.Count)
if nil != err {
return nil, err
}
......@@ -487,10 +500,11 @@ func (chain33Relayer *Relayer4Chain33) ShowStatics(request ebTypes.TokenStaticsR
for _, data := range datas {
var statics ebTypes.Ethereum2Chain33Statics
_ = chain33Types.Decode(data, &statics)
if request.Status != 0 {
if ebTypes.Tx_Status_Map[request.Status] != statics.Chain33Txstatus {
continue
}
if request.Status != 0 && ebTypes.Tx_Status_Map[request.Status] != statics.Chain33Txstatus {
continue
}
if len(request.Symbol) > 0 && request.Symbol != statics.Symbol {
continue
}
res.E2Cstatics = append(res.E2Cstatics, &statics)
}
......@@ -504,30 +518,28 @@ func (chain33Relayer *Relayer4Chain33) updateTxStatus() {
func (chain33Relayer *Relayer4Chain33) updateSingleTxStatus(claimType events.ClaimType) {
txIndex := chain33Relayer.getChain33UpdateTxIndex(claimType)
if ebTypes.Invalid_Tx_Index == txIndex {
return
}
datas, _ := chain33Relayer.getStatics(int32(claimType), txIndex)
datas, _ := chain33Relayer.getStatics(int32(claimType), txIndex, 0)
if nil == datas {
return
}
for _, data := range datas {
var statics ebTypes.Chain33ToEthereumStatics
var statics ebTypes.Ethereum2Chain33Statics
_ = chain33Types.Decode(data, &statics)
result := getTxStatusByHashesRpc(statics.Chain33Txhash, chain33Relayer.rpcLaddr)
//当前处理机制比较简单,如果发现该笔交易未执行,就不再产寻后续交易的回执
if ebTypes.Invalid_Chain33Tx_Status == result {
relayerLog.Debug("chain33Relayer::updateSingleTxStatus", "no receipt for tx index", statics.TxIndex)
break
}
status := ebTypes.Tx_Status_Success
if result != chain33Types.ExecOk {
status = ebTypes.Tx_Status_Failed
}
statics.EthTxstatus = status
statics.Chain33Txstatus = status
dataNew := chain33Types.Encode(&statics)
_ = chain33Relayer.setLastestRelay2Chain33TxStatics(statics.TxIndex, int32(claimType), dataNew)
_ = chain33Relayer.setChain33UpdateTxIndex(statics.TxIndex, claimType)
relayerLog.Info("updateSingleTxStatus", "txHash", statics.Chain33Txhash, "updated status", status)
relayerLog.Debug("updateSingleTxStatus", "TxIndex", statics.TxIndex, "operationType", statics.OperationType, "txHash", statics.Chain33Txhash, "updated status", status)
}
}
......
......@@ -100,21 +100,21 @@ func newChain33Relayer(x2EthDeployInfo *ethtxs.X2EthDeployInfo, pushBind string)
var wg sync.WaitGroup
relayer := &Relayer4Chain33{
rpcLaddr: cfg.SyncTxConfig.Chain33Host,
fetchHeightPeriodMs: cfg.SyncTxConfig.FetchHeightPeriodMs,
db: db,
ctx: ctx,
bridgeRegistryAddr: x2EthDeployInfo.BridgeRegistry.Address.String(),
chainName: "",
chainID: 0,
unlockChan: make(chan int),
deployInfo: cfg.Deploy,
ethBridgeClaimChan: ethBridgeClaimchan,
chain33MsgChan: chain33Msgchan,
totalTx4Chain33ToEth: 0,
symbol2Addr: make(map[string]string),
oracleAddr: x2EthDeployInfo.Oracle.Address.String(),
bridgeBankAddr: x2EthDeployInfo.BridgeBank.Address.String(),
rpcLaddr: cfg.SyncTxConfig.Chain33Host,
fetchHeightPeriodMs: cfg.SyncTxConfig.FetchHeightPeriodMs,
db: db,
ctx: ctx,
bridgeRegistryAddr: x2EthDeployInfo.BridgeRegistry.Address.String(),
chainName: "",
chainID: 0,
unlockChan: make(chan int),
deployInfo: cfg.Deploy,
ethBridgeClaimChan: ethBridgeClaimchan,
chain33MsgChan: chain33Msgchan,
totalTx4RelayEth2chai33: 0,
symbol2Addr: make(map[string]string),
oracleAddr: x2EthDeployInfo.Oracle.Address.String(),
bridgeBankAddr: x2EthDeployInfo.BridgeBank.Address.String(),
}
//err := relayer.setStatusCheckedIndex(1)
......
......@@ -3,7 +3,6 @@ package chain33
import (
"errors"
"fmt"
"sync/atomic"
dbm "github.com/33cn/chain33/common/db"
chain33Types "github.com/33cn/chain33/types"
......@@ -16,7 +15,8 @@ import (
var (
lastSyncHeightPrefix = []byte("chain33-lastSyncHeight:")
eth2Chain33BurnLockTxStaticsPrefix = "chain33-eth2chain33BurnLockStatics"
chain33ToEthBurnLockTxTotalAmount = []byte("chain33-chain33ToEthBurnLockTxTotalAmount")
eth2Chain33BurnLockTxFinished = "chain33-eth2Chain33BurnLockTxFinished"
relayEthBurnLockTxTotalAmount = []byte("chain33-relayEthBurnLockTxTotalAmount")
chain33BurnTxUpdateTxIndex = []byte("chain33-chain33BurnTxUpdateTxIndx")
chain33LockTxUpdateTxIndex = []byte("chain33-chain33LockTxUpdateTxIndex")
bridgeRegistryAddrOnChain33 = []byte("chain33-x2EthBridgeRegistryAddrOnChain33")
......@@ -32,20 +32,29 @@ func calcRelayFromEthStaticsKey(txindex int64, claimType int32) []byte {
return []byte(fmt.Sprintf("%s-%d-%012d", eth2Chain33BurnLockTxStaticsPrefix, claimType, txindex))
}
//未完成,处在pending状态
func calcRelayFromEthStaticsList(claimType int32) []byte {
return []byte(fmt.Sprintf("%s-%d-", eth2Chain33BurnLockTxStaticsPrefix, claimType))
}
func (chain33Relayer *Relayer4Chain33) updateTotalTxAmount2Eth(total int64) error {
func calcFromEthFinishedStaticsKey(txindex int64, claimType int32) []byte {
return []byte(fmt.Sprintf("%s-%d-%012d", eth2Chain33BurnLockTxFinished, claimType, txindex))
}
func calcFromEthFinishedStaticsList(claimType int32) []byte {
return []byte(fmt.Sprintf("%s-%d-", eth2Chain33BurnLockTxFinished, claimType))
}
func (chain33Relayer *Relayer4Chain33) updateTotalTxAmount2Eth(txIndex int64) error {
totalTx := &chain33Types.Int64{
Data: atomic.LoadInt64(&chain33Relayer.totalTx4Chain33ToEth),
Data: txIndex,
}
//更新成功见证的交易数
return chain33Relayer.db.Set(chain33ToEthBurnLockTxTotalAmount, chain33Types.Encode(totalTx))
return chain33Relayer.db.Set(relayEthBurnLockTxTotalAmount, chain33Types.Encode(totalTx))
}
func (chain33Relayer *Relayer4Chain33) getTotalTxAmount2Eth() int64 {
totalTx, _ := utils.LoadInt64FromDB(chain33ToEthBurnLockTxTotalAmount, chain33Relayer.db)
func (chain33Relayer *Relayer4Chain33) getTotalTxAmount() int64 {
totalTx, _ := utils.LoadInt64FromDB(relayEthBurnLockTxTotalAmount, chain33Relayer.db)
return totalTx
}
......@@ -54,18 +63,19 @@ func (chain33Relayer *Relayer4Chain33) setLastestRelay2Chain33TxStatics(txIndex
return chain33Relayer.db.Set(key, data)
}
func (chain33Relayer *Relayer4Chain33) getStatics(claimType int32, txIndex int64) ([][]byte, error) {
func (chain33Relayer *Relayer4Chain33) getStatics(claimType int32, txIndex int64, count int32) ([][]byte, error) {
//第一步:获取处在pending状态的
keyPrefix := calcRelayFromEthStaticsList(claimType)
keyFrom := calcRelayFromEthStaticsKey(txIndex, claimType)
helper := dbm.NewListHelper(chain33Relayer.db)
datas := helper.List(keyPrefix, keyFrom, 20, dbm.ListASC)
datas := helper.List(keyPrefix, keyFrom, count, dbm.ListASC)
if nil == datas {
return nil, errors.New("Not found")
}
return datas, nil
}
func (chain33Relayer *Relayer4Chain33) setChain33UpdateTxIndex(txindex int64, claimType events.ClaimType) error {
txIndexWrapper := &chain33Types.Int64{
Data: txindex,
......
......@@ -50,29 +50,29 @@ type Relayer4Ethereum struct {
privateKey4Ethereum *ecdsa.PrivateKey
ethSender common.Address
ethValidator common.Address
unlockchan chan int
maturityDegree int32
fetchHeightPeriodMs int32
eventLogIndex ebTypes.EventLogIndex
clientSpec ethinterface.EthClientSpec
bridgeBankAddr common.Address
bridgeBankSub ethereum.Subscription
bridgeBankLog chan types.Log
bridgeBankEventLockSig string
bridgeBankEventBurnSig string
bridgeBankAbi abi.ABI
deployInfo *ebTypes.Deploy
x2EthDeployInfo *ethtxs.X2EthDeployInfo
deployPara *ethtxs.DeployPara
operatorInfo *ethtxs.OperatorInfo
x2EthContracts *ethtxs.X2EthContracts
ethBridgeClaimChan chan<- *ebTypes.EthBridgeClaim
chain33MsgChan <-chan *events.Chain33Msg
totalTx4Eth2Chain33 int64
symbol2Addr map[string]common.Address
symbol2LockAddr map[string]common.Address
mulSignAddr string
ethValidator common.Address
unlockchan chan int
maturityDegree int32
fetchHeightPeriodMs int32
eventLogIndex ebTypes.EventLogIndex
clientSpec ethinterface.EthClientSpec
bridgeBankAddr common.Address
bridgeBankSub ethereum.Subscription
bridgeBankLog chan types.Log
bridgeBankEventLockSig string
bridgeBankEventBurnSig string
bridgeBankAbi abi.ABI
deployInfo *ebTypes.Deploy
x2EthDeployInfo *ethtxs.X2EthDeployInfo
deployPara *ethtxs.DeployPara
operatorInfo *ethtxs.OperatorInfo
x2EthContracts *ethtxs.X2EthContracts
ethBridgeClaimChan chan<- *ebTypes.EthBridgeClaim
chain33MsgChan <-chan *events.Chain33Msg
totalTxRelayFromChain33 int64
symbol2Addr map[string]common.Address
symbol2LockAddr map[string]common.Address
mulSignAddr string
}
var (
......@@ -100,18 +100,18 @@ func StartEthereumRelayer(startPara *EthereumStartPara) *Relayer4Ethereum {
startPara.BlockInterval = DefaultBlockPeriod
}
ethRelayer := &Relayer4Ethereum{
provider: startPara.EthProvider,
db: startPara.DbHandle,
unlockchan: make(chan int, 2),
bridgeRegistryAddr: common.HexToAddress(startPara.BridgeRegistryAddr),
deployInfo: startPara.DeployInfo,
maturityDegree: startPara.Degree,
fetchHeightPeriodMs: startPara.BlockInterval,
ethBridgeClaimChan: startPara.EthBridgeClaimChan,
chain33MsgChan: startPara.Chain33MsgChan,
totalTx4Eth2Chain33: 0,
symbol2Addr: make(map[string]common.Address),
symbol2LockAddr: make(map[string]common.Address),
provider: startPara.EthProvider,
db: startPara.DbHandle,
unlockchan: make(chan int, 2),
bridgeRegistryAddr: common.HexToAddress(startPara.BridgeRegistryAddr),
deployInfo: startPara.DeployInfo,
maturityDegree: startPara.Degree,
fetchHeightPeriodMs: startPara.BlockInterval,
ethBridgeClaimChan: startPara.EthBridgeClaimChan,
chain33MsgChan: startPara.Chain33MsgChan,
totalTxRelayFromChain33: 0,
symbol2Addr: make(map[string]common.Address),
symbol2LockAddr: make(map[string]common.Address),
}
registrAddrInDB, err := ethRelayer.getBridgeRegistryAddr()
......@@ -142,6 +142,13 @@ func StartEthereumRelayer(startPara *EthereumStartPara) *Relayer4Ethereum {
panic(errinfo)
}
ethRelayer.clientChainID = clientChainID
ethRelayer.totalTxRelayFromChain33 = ethRelayer.getTotalTxAmount2Eth()
if 0 == ethRelayer.totalTxRelayFromChain33 {
statics := &ebTypes.Ethereum2Chain33Statics{}
data := chain33Types.Encode(statics)
_ = ethRelayer.setLastestStatics(int32(events.ClaimTypeLock), 0, data)
_ = ethRelayer.setLastestStatics(int32(events.ClaimTypeBurn), 0, data)
}
go ethRelayer.proc()
return ethRelayer
......@@ -466,7 +473,9 @@ func (ethRelayer *Relayer4Ethereum) handleChain33Msg(chain33Msg *events.Chain33M
prophecyClaim := ethtxs.Chain33MsgToProphecyClaim(*chain33Msg)
var tokenAddr common.Address
exist := false
operationType := ""
if chain33Msg.ClaimType == events.ClaimTypeLock {
operationType = "lock"
tokenAddr, exist = ethRelayer.symbol2Addr[prophecyClaim.Symbol]
if !exist {
relayerLog.Info("handleChain33Msg", "Query address from ethereum for symbol", prophecyClaim.Symbol)
......@@ -488,6 +497,7 @@ func (ethRelayer *Relayer4Ethereum) handleChain33Msg(chain33Msg *events.Chain33M
tokenAddr = common.HexToAddress(addr)
}
} else {
operationType = "burn"
tokenAddr, exist = ethRelayer.symbol2LockAddr[prophecyClaim.Symbol]
if !exist {
//因为是burn操作,必须从允许lock的token地址中进行查询
......@@ -516,8 +526,7 @@ func (ethRelayer *Relayer4Ethereum) handleChain33Msg(chain33Msg *events.Chain33M
relayerLog.Info("handleChain33Msg", "RelayOracleClaimToEthereum with tx hash", txhash)
//保存交易hash,方便查询
atomic.AddInt64(&ethRelayer.totalTx4Eth2Chain33, 1)
txIndex := atomic.LoadInt64(&ethRelayer.totalTx4Eth2Chain33)
txIndex := atomic.AddInt64(&ethRelayer.totalTxRelayFromChain33, 1)
if err = ethRelayer.updateTotalTxAmount2chain33(txIndex); nil != err {
relayerLog.Error("handleChain33Msg", "Failed to RelayLockToChain33 due to:", err.Error())
return
......@@ -533,12 +542,22 @@ func (ethRelayer *Relayer4Ethereum) handleChain33Msg(chain33Msg *events.Chain33M
Amount: chain33Msg.Amount.String(),
Nonce: chain33Msg.Nonce,
TxIndex: txIndex,
OperationType: operationType,
}
data := chain33Types.Encode(statics)
if err = ethRelayer.setLastestStatics(int32(chain33Msg.ClaimType), txIndex, data); nil != err {
relayerLog.Error("handleChain33Msg", "Failed to RelayLockToChain33 due to:", err.Error())
return
}
relayerLog.Info("RelayOracleClaimToEthereum::successful",
"txIndex", txIndex,
"Chain33Txhash", statics.Chain33Txhash,
"EthereumTxhash", statics.EthereumTxhash,
"type", operationType,
"Symbol", chain33Msg.Symbol,
"Amount", chain33Msg.Amount,
"EthereumReceiver", statics.EthereumReceiver,
"Chain33Sender", statics.Chain33Sender)
}
func (ethRelayer *Relayer4Ethereum) procNewHeight(ctx context.Context, continueFailCount *int32) {
......@@ -889,10 +908,10 @@ func (ethRelayer *Relayer4Ethereum) handleLogBurnEvent(clientChainID *big.Int, c
return nil
}
func (ethRelayer *Relayer4Ethereum) ShowStatics(request ebTypes.TokenStaticsRequest) (*ebTypes.TokenStaticsResponse, error) {
func (ethRelayer *Relayer4Ethereum) ShowStatics(request *ebTypes.TokenStaticsRequest) (*ebTypes.TokenStaticsResponse, error) {
res := &ebTypes.TokenStaticsResponse{}
datas, err := ethRelayer.getStatics(request.Operation, request.TxIndex)
datas, err := ethRelayer.getStatics(request.Operation, request.TxIndex, request.Count)
if nil != err {
return nil, err
}
......@@ -900,10 +919,11 @@ func (ethRelayer *Relayer4Ethereum) ShowStatics(request ebTypes.TokenStaticsRequ
for _, data := range datas {
var statics ebTypes.Chain33ToEthereumStatics
_ = chain33Types.Decode(data, &statics)
if request.Status != 0 {
if ebTypes.Tx_Status_Map[request.Status] != statics.EthTxstatus {
continue
}
if request.Status != 0 && ebTypes.Tx_Status_Map[request.Status] != statics.EthTxstatus {
continue
}
if len(request.Symbol) > 0 && request.Symbol != statics.Symbol {
continue
}
res.C2Estatics = append(res.C2Estatics, &statics)
}
......@@ -917,11 +937,9 @@ func (ethRelayer *Relayer4Ethereum) updateTxStatus() {
func (ethRelayer *Relayer4Ethereum) updateSingleTxStatus(claimType events.ClaimType) {
txIndex := ethRelayer.getEthLockTxUpdateTxIndex(claimType)
if ebTypes.Invalid_Tx_Index == txIndex {
return
}
datas, _ := ethRelayer.getStatics(int32(claimType), txIndex)
datas, _ := ethRelayer.getStatics(int32(claimType), txIndex, 0)
if nil == datas {
relayerLog.Debug("ethRelayer::updateSingleTxStatus", "no new tx need to be update status for claimType", claimType, "from tx index", txIndex)
return
}
for _, data := range datas {
......
......@@ -406,15 +406,15 @@ func newEthRelayer(para *ethtxs.DeployPara, sim *ethinterface.SimExtend, x2EthCo
chain33Msgchan := make(chan *events.Chain33Msg, 100)
relayer := &Relayer4Ethereum{
provider: cfg.EthProvider,
db: db,
unlockchan: make(chan int, 2),
bridgeRegistryAddr: x2EthDeployInfo.BridgeRegistry.Address,
maturityDegree: cfg.EthMaturityDegree,
fetchHeightPeriodMs: cfg.EthBlockFetchPeriod,
totalTx4Eth2Chain33: 0,
symbol2Addr: make(map[string]common.Address),
symbol2LockAddr: make(map[string]common.Address),
provider: cfg.EthProvider,
db: db,
unlockchan: make(chan int, 2),
bridgeRegistryAddr: x2EthDeployInfo.BridgeRegistry.Address,
maturityDegree: cfg.EthMaturityDegree,
fetchHeightPeriodMs: cfg.EthBlockFetchPeriod,
totalTxRelayFromChain33: 0,
symbol2Addr: make(map[string]common.Address),
symbol2LockAddr: make(map[string]common.Address),
ethBridgeClaimChan: ethBridgeClaimchan,
chain33MsgChan: chain33Msgchan,
......@@ -447,6 +447,7 @@ func newEthRelayer(para *ethtxs.DeployPara, sim *ethinterface.SimExtend, x2EthCo
relayer.x2EthDeployInfo = x2EthDeployInfo
relayer.rwLock.Unlock()
relayer.totalTxRelayFromChain33 = relayer.getTotalTxAmount2Eth()
go relayer.proc()
return relayer
}
......
......@@ -4,7 +4,6 @@ import (
"encoding/json"
"errors"
"fmt"
"sync/atomic"
"github.com/ethereum/go-ethereum/common"
......@@ -50,12 +49,12 @@ func calcRelayFromChain33ListPrefix(claimType int32) []byte {
return []byte(fmt.Sprintf("%s-%d-", chain33ToEthStaticsPrefix, claimType))
}
func (ethRelayer *Relayer4Ethereum) getStatics(claimType int32, txIndex int64) ([][]byte, error) {
func (ethRelayer *Relayer4Ethereum) getStatics(claimType int32, txIndex int64, count int32) ([][]byte, error) {
keyPrefix := calcRelayFromChain33ListPrefix(claimType)
keyFrom := calcRelayFromChain33Key(claimType, txIndex)
helper := dbm.NewListHelper(ethRelayer.db)
datas := helper.List(keyPrefix, keyFrom, 20, dbm.ListASC)
datas := helper.List(keyPrefix, keyFrom, count, dbm.ListASC)
if nil == datas {
return nil, errors.New("Not found")
}
......@@ -106,14 +105,19 @@ func (ethRelayer *Relayer4Ethereum) getBridgeRegistryAddr() (string, error) {
return string(addr), nil
}
func (ethRelayer *Relayer4Ethereum) updateTotalTxAmount2chain33(total int64) error {
func (ethRelayer *Relayer4Ethereum) updateTotalTxAmount2chain33(totalIndex int64) error {
totalTx := &chain33Types.Int64{
Data: atomic.LoadInt64(&ethRelayer.totalTx4Eth2Chain33),
Data: totalIndex,
}
//更新成功见证的交易数
return ethRelayer.db.Set(chain33ToEthTxTotalAmount, chain33Types.Encode(totalTx))
}
func (ethRelayer *Relayer4Ethereum) getTotalTxAmount2Eth() int64 {
totalTx, _ := utils.LoadInt64FromDB(chain33ToEthTxTotalAmount, ethRelayer.db)
return totalTx
}
func (ethRelayer *Relayer4Ethereum) setLastestStatics(claimType int32, txIndex int64, data []byte) error {
key := calcRelayFromChain33Key(claimType, txIndex)
return ethRelayer.db.Set(key, data)
......
......@@ -848,7 +848,7 @@ func (manager *Manager) checkPermission() error {
}
// ShowTokenStatics ShowEthRelayer2Chain33Txs ...
func (manager *Manager) ShowTokenStatics(request relayerTypes.TokenStaticsRequest, result *interface{}) error {
func (manager *Manager) ShowTokenStatics(request *relayerTypes.TokenStaticsRequest, result *interface{}) error {
manager.mtx.Lock()
defer manager.mtx.Unlock()
if err := manager.checkPermission(); nil != err {
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.9.1
// source: config.proto
package types
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SyncTxConfig struct {
Chain33Host string `protobuf:"bytes,1,opt,name=chain33host,proto3" json:"chain33host,omitempty"`
PushHost string `protobuf:"bytes,2,opt,name=pushHost,proto3" json:"pushHost,omitempty"`
PushName string `protobuf:"bytes,3,opt,name=pushName,proto3" json:"pushName,omitempty"`
PushBind string `protobuf:"bytes,4,opt,name=pushBind,proto3" json:"pushBind,omitempty"`
MaturityDegree int32 `protobuf:"varint,5,opt,name=maturityDegree,proto3" json:"maturityDegree,omitempty"`
Dbdriver string `protobuf:"bytes,6,opt,name=dbdriver,proto3" json:"dbdriver,omitempty"`
DbPath string `protobuf:"bytes,7,opt,name=dbPath,proto3" json:"dbPath,omitempty"`
DbCache int32 `protobuf:"varint,8,opt,name=dbCache,proto3" json:"dbCache,omitempty"`
FetchHeightPeriodMs int64 `protobuf:"varint,9,opt,name=fetchHeightPeriodMs,proto3" json:"fetchHeightPeriodMs,omitempty"`
StartSyncHeight int64 `protobuf:"varint,10,opt,name=startSyncHeight,proto3" json:"startSyncHeight,omitempty"`
StartSyncSequence int64 `protobuf:"varint,11,opt,name=startSyncSequence,proto3" json:"startSyncSequence,omitempty"`
StartSyncHash string `protobuf:"bytes,12,opt,name=startSyncHash,proto3" json:"startSyncHash,omitempty"`
Contracts []string `protobuf:"bytes,13,rep,name=contracts,proto3" json:"contracts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SyncTxConfig) Reset() { *m = SyncTxConfig{} }
func (m *SyncTxConfig) String() string { return proto.CompactTextString(m) }
func (*SyncTxConfig) ProtoMessage() {}
func (*SyncTxConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{0}
}
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
func (m *SyncTxConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SyncTxConfig.Unmarshal(m, b)
Chain33Host string `protobuf:"bytes,1,opt,name=chain33host,proto3" json:"chain33host,omitempty"`
PushHost string `protobuf:"bytes,2,opt,name=pushHost,proto3" json:"pushHost,omitempty"`
PushName string `protobuf:"bytes,3,opt,name=pushName,proto3" json:"pushName,omitempty"`
PushBind string `protobuf:"bytes,4,opt,name=pushBind,proto3" json:"pushBind,omitempty"`
MaturityDegree int32 `protobuf:"varint,5,opt,name=maturityDegree,proto3" json:"maturityDegree,omitempty"`
Dbdriver string `protobuf:"bytes,6,opt,name=dbdriver,proto3" json:"dbdriver,omitempty"` //数据库类型
DbPath string `protobuf:"bytes,7,opt,name=dbPath,proto3" json:"dbPath,omitempty"` //数据库存储目录
DbCache int32 `protobuf:"varint,8,opt,name=dbCache,proto3" json:"dbCache,omitempty"` //数据库缓存大小
FetchHeightPeriodMs int64 `protobuf:"varint,9,opt,name=fetchHeightPeriodMs,proto3" json:"fetchHeightPeriodMs,omitempty"`
StartSyncHeight int64 `protobuf:"varint,10,opt,name=startSyncHeight,proto3" json:"startSyncHeight,omitempty"`
StartSyncSequence int64 `protobuf:"varint,11,opt,name=startSyncSequence,proto3" json:"startSyncSequence,omitempty"`
StartSyncHash string `protobuf:"bytes,12,opt,name=startSyncHash,proto3" json:"startSyncHash,omitempty"`
Contracts []string `protobuf:"bytes,13,rep,name=contracts,proto3" json:"contracts,omitempty"`
}
func (m *SyncTxConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SyncTxConfig.Marshal(b, m, deterministic)
}
func (m *SyncTxConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncTxConfig.Merge(m, src)
func (x *SyncTxConfig) Reset() {
*x = SyncTxConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *SyncTxConfig) XXX_Size() int {
return xxx_messageInfo_SyncTxConfig.Size(m)
func (x *SyncTxConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (m *SyncTxConfig) XXX_DiscardUnknown() {
xxx_messageInfo_SyncTxConfig.DiscardUnknown(m)
func (*SyncTxConfig) ProtoMessage() {}
func (x *SyncTxConfig) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var xxx_messageInfo_SyncTxConfig proto.InternalMessageInfo
// Deprecated: Use SyncTxConfig.ProtoReflect.Descriptor instead.
func (*SyncTxConfig) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{0}
}
func (m *SyncTxConfig) GetChain33Host() string {
if m != nil {
return m.Chain33Host
func (x *SyncTxConfig) GetChain33Host() string {
if x != nil {
return x.Chain33Host
}
return ""
}
func (m *SyncTxConfig) GetPushHost() string {
if m != nil {
return m.PushHost
func (x *SyncTxConfig) GetPushHost() string {
if x != nil {
return x.PushHost
}
return ""
}
func (m *SyncTxConfig) GetPushName() string {
if m != nil {
return m.PushName
func (x *SyncTxConfig) GetPushName() string {
if x != nil {
return x.PushName
}
return ""
}
func (m *SyncTxConfig) GetPushBind() string {
if m != nil {
return m.PushBind
func (x *SyncTxConfig) GetPushBind() string {
if x != nil {
return x.PushBind
}
return ""
}
func (m *SyncTxConfig) GetMaturityDegree() int32 {
if m != nil {
return m.MaturityDegree
func (x *SyncTxConfig) GetMaturityDegree() int32 {
if x != nil {
return x.MaturityDegree
}
return 0
}
func (m *SyncTxConfig) GetDbdriver() string {
if m != nil {
return m.Dbdriver
func (x *SyncTxConfig) GetDbdriver() string {
if x != nil {
return x.Dbdriver
}
return ""
}
func (m *SyncTxConfig) GetDbPath() string {
if m != nil {
return m.DbPath
func (x *SyncTxConfig) GetDbPath() string {
if x != nil {
return x.DbPath
}
return ""
}
func (m *SyncTxConfig) GetDbCache() int32 {
if m != nil {
return m.DbCache
func (x *SyncTxConfig) GetDbCache() int32 {
if x != nil {
return x.DbCache
}
return 0
}
func (m *SyncTxConfig) GetFetchHeightPeriodMs() int64 {
if m != nil {
return m.FetchHeightPeriodMs
func (x *SyncTxConfig) GetFetchHeightPeriodMs() int64 {
if x != nil {
return x.FetchHeightPeriodMs
}
return 0
}
func (m *SyncTxConfig) GetStartSyncHeight() int64 {
if m != nil {
return m.StartSyncHeight
func (x *SyncTxConfig) GetStartSyncHeight() int64 {
if x != nil {
return x.StartSyncHeight
}
return 0
}
func (m *SyncTxConfig) GetStartSyncSequence() int64 {
if m != nil {
return m.StartSyncSequence
func (x *SyncTxConfig) GetStartSyncSequence() int64 {
if x != nil {
return x.StartSyncSequence
}
return 0
}
func (m *SyncTxConfig) GetStartSyncHash() string {
if m != nil {
return m.StartSyncHash
func (x *SyncTxConfig) GetStartSyncHash() string {
if x != nil {
return x.StartSyncHash
}
return ""
}
func (m *SyncTxConfig) GetContracts() []string {
if m != nil {
return m.Contracts
func (x *SyncTxConfig) GetContracts() []string {
if x != nil {
return x.Contracts
}
return nil
}
type Log struct {
Loglevel string `protobuf:"bytes,1,opt,name=loglevel,proto3" json:"loglevel,omitempty"`
LogConsoleLevel string `protobuf:"bytes,2,opt,name=logConsoleLevel,proto3" json:"logConsoleLevel,omitempty"`
LogFile string `protobuf:"bytes,3,opt,name=logFile,proto3" json:"logFile,omitempty"`
MaxFileSize uint32 `protobuf:"varint,4,opt,name=maxFileSize,proto3" json:"maxFileSize,omitempty"`
MaxBackups uint32 `protobuf:"varint,5,opt,name=maxBackups,proto3" json:"maxBackups,omitempty"`
MaxAge uint32 `protobuf:"varint,6,opt,name=maxAge,proto3" json:"maxAge,omitempty"`
LocalTime bool `protobuf:"varint,7,opt,name=localTime,proto3" json:"localTime,omitempty"`
Compress bool `protobuf:"varint,8,opt,name=compress,proto3" json:"compress,omitempty"`
CallerFile bool `protobuf:"varint,9,opt,name=callerFile,proto3" json:"callerFile,omitempty"`
CallerFunction bool `protobuf:"varint,10,opt,name=callerFunction,proto3" json:"callerFunction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Log) Reset() { *m = Log{} }
func (m *Log) String() string { return proto.CompactTextString(m) }
func (*Log) ProtoMessage() {}
func (*Log) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{1}
}
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
func (m *Log) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Log.Unmarshal(m, b)
Loglevel string `protobuf:"bytes,1,opt,name=loglevel,proto3" json:"loglevel,omitempty"`
LogConsoleLevel string `protobuf:"bytes,2,opt,name=logConsoleLevel,proto3" json:"logConsoleLevel,omitempty"`
LogFile string `protobuf:"bytes,3,opt,name=logFile,proto3" json:"logFile,omitempty"`
MaxFileSize uint32 `protobuf:"varint,4,opt,name=maxFileSize,proto3" json:"maxFileSize,omitempty"`
MaxBackups uint32 `protobuf:"varint,5,opt,name=maxBackups,proto3" json:"maxBackups,omitempty"`
MaxAge uint32 `protobuf:"varint,6,opt,name=maxAge,proto3" json:"maxAge,omitempty"`
LocalTime bool `protobuf:"varint,7,opt,name=localTime,proto3" json:"localTime,omitempty"`
Compress bool `protobuf:"varint,8,opt,name=compress,proto3" json:"compress,omitempty"`
CallerFile bool `protobuf:"varint,9,opt,name=callerFile,proto3" json:"callerFile,omitempty"`
CallerFunction bool `protobuf:"varint,10,opt,name=callerFunction,proto3" json:"callerFunction,omitempty"`
}
func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Log.Marshal(b, m, deterministic)
}
func (m *Log) XXX_Merge(src proto.Message) {
xxx_messageInfo_Log.Merge(m, src)
func (x *Log) Reset() {
*x = Log{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *Log) XXX_Size() int {
return xxx_messageInfo_Log.Size(m)
func (x *Log) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (m *Log) XXX_DiscardUnknown() {
xxx_messageInfo_Log.DiscardUnknown(m)
func (*Log) ProtoMessage() {}
func (x *Log) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var xxx_messageInfo_Log proto.InternalMessageInfo
// Deprecated: Use Log.ProtoReflect.Descriptor instead.
func (*Log) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{1}
}
func (m *Log) GetLoglevel() string {
if m != nil {
return m.Loglevel
func (x *Log) GetLoglevel() string {
if x != nil {
return x.Loglevel
}
return ""
}
func (m *Log) GetLogConsoleLevel() string {
if m != nil {
return m.LogConsoleLevel
func (x *Log) GetLogConsoleLevel() string {
if x != nil {
return x.LogConsoleLevel
}
return ""
}
func (m *Log) GetLogFile() string {
if m != nil {
return m.LogFile
func (x *Log) GetLogFile() string {
if x != nil {
return x.LogFile
}
return ""
}
func (m *Log) GetMaxFileSize() uint32 {
if m != nil {
return m.MaxFileSize
func (x *Log) GetMaxFileSize() uint32 {
if x != nil {
return x.MaxFileSize
}
return 0
}
func (m *Log) GetMaxBackups() uint32 {
if m != nil {
return m.MaxBackups
func (x *Log) GetMaxBackups() uint32 {
if x != nil {
return x.MaxBackups
}
return 0
}
func (m *Log) GetMaxAge() uint32 {
if m != nil {
return m.MaxAge
func (x *Log) GetMaxAge() uint32 {
if x != nil {
return x.MaxAge
}
return 0
}
func (m *Log) GetLocalTime() bool {
if m != nil {
return m.LocalTime
func (x *Log) GetLocalTime() bool {
if x != nil {
return x.LocalTime
}
return false
}
func (m *Log) GetCompress() bool {
if m != nil {
return m.Compress
func (x *Log) GetCompress() bool {
if x != nil {
return x.Compress
}
return false
}
func (m *Log) GetCallerFile() bool {
if m != nil {
return m.CallerFile
func (x *Log) GetCallerFile() bool {
if x != nil {
return x.CallerFile
}
return false
}
func (m *Log) GetCallerFunction() bool {
if m != nil {
return m.CallerFunction
func (x *Log) GetCallerFunction() bool {
if x != nil {
return x.CallerFunction
}
return false
}
type RelayerConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
SyncTxConfig *SyncTxConfig `protobuf:"bytes,2,opt,name=syncTxConfig,proto3" json:"syncTxConfig,omitempty"`
Log *Log `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
JrpcBindAddr string `protobuf:"bytes,4,opt,name=jrpcBindAddr,proto3" json:"jrpcBindAddr,omitempty"`
JrpcBindAddr string `protobuf:"bytes,4,opt,name=jrpcBindAddr,proto3" json:"jrpcBindAddr,omitempty"` // Jrpc服务地址
EthProvider string `protobuf:"bytes,5,opt,name=ethProvider,proto3" json:"ethProvider,omitempty"`
BridgeRegistry string `protobuf:"bytes,6,opt,name=bridgeRegistry,proto3" json:"bridgeRegistry,omitempty"`
Deploy *Deploy `protobuf:"bytes,7,opt,name=deploy,proto3" json:"deploy,omitempty"`
......@@ -282,230 +306,246 @@ type RelayerConfig struct {
BridgeRegistryOnChain33 string `protobuf:"bytes,12,opt,name=bridgeRegistryOnChain33,proto3" json:"bridgeRegistryOnChain33,omitempty"`
ChainName string `protobuf:"bytes,13,opt,name=chainName,proto3" json:"chainName,omitempty"`
ChainID4Chain33 int32 `protobuf:"varint,14,opt,name=chainID4Chain33,proto3" json:"chainID4Chain33,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RelayerConfig) Reset() { *m = RelayerConfig{} }
func (m *RelayerConfig) String() string { return proto.CompactTextString(m) }
func (*RelayerConfig) ProtoMessage() {}
func (*RelayerConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{2}
func (x *RelayerConfig) Reset() {
*x = RelayerConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *RelayerConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RelayerConfig.Unmarshal(m, b)
}
func (m *RelayerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RelayerConfig.Marshal(b, m, deterministic)
}
func (m *RelayerConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_RelayerConfig.Merge(m, src)
}
func (m *RelayerConfig) XXX_Size() int {
return xxx_messageInfo_RelayerConfig.Size(m)
func (x *RelayerConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (m *RelayerConfig) XXX_DiscardUnknown() {
xxx_messageInfo_RelayerConfig.DiscardUnknown(m)
func (*RelayerConfig) ProtoMessage() {}
func (x *RelayerConfig) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var xxx_messageInfo_RelayerConfig proto.InternalMessageInfo
// Deprecated: Use RelayerConfig.ProtoReflect.Descriptor instead.
func (*RelayerConfig) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{2}
}
func (m *RelayerConfig) GetTitle() string {
if m != nil {
return m.Title
func (x *RelayerConfig) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (m *RelayerConfig) GetSyncTxConfig() *SyncTxConfig {
if m != nil {
return m.SyncTxConfig
func (x *RelayerConfig) GetSyncTxConfig() *SyncTxConfig {
if x != nil {
return x.SyncTxConfig
}
return nil
}
func (m *RelayerConfig) GetLog() *Log {
if m != nil {
return m.Log
func (x *RelayerConfig) GetLog() *Log {
if x != nil {
return x.Log
}
return nil
}
func (m *RelayerConfig) GetJrpcBindAddr() string {
if m != nil {
return m.JrpcBindAddr
func (x *RelayerConfig) GetJrpcBindAddr() string {
if x != nil {
return x.JrpcBindAddr
}
return ""
}
func (m *RelayerConfig) GetEthProvider() string {
if m != nil {
return m.EthProvider
func (x *RelayerConfig) GetEthProvider() string {
if x != nil {
return x.EthProvider
}
return ""
}
func (m *RelayerConfig) GetBridgeRegistry() string {
if m != nil {
return m.BridgeRegistry
func (x *RelayerConfig) GetBridgeRegistry() string {
if x != nil {
return x.BridgeRegistry
}
return ""
}
func (m *RelayerConfig) GetDeploy() *Deploy {
if m != nil {
return m.Deploy
func (x *RelayerConfig) GetDeploy() *Deploy {
if x != nil {
return x.Deploy
}
return nil
}
func (m *RelayerConfig) GetDeploy4Chain33() *Deploy {
if m != nil {
return m.Deploy4Chain33
func (x *RelayerConfig) GetDeploy4Chain33() *Deploy {
if x != nil {
return x.Deploy4Chain33
}
return nil
}
func (m *RelayerConfig) GetEthMaturityDegree() int32 {
if m != nil {
return m.EthMaturityDegree
func (x *RelayerConfig) GetEthMaturityDegree() int32 {
if x != nil {
return x.EthMaturityDegree
}
return 0
}
func (m *RelayerConfig) GetEthBlockFetchPeriod() int32 {
if m != nil {
return m.EthBlockFetchPeriod
func (x *RelayerConfig) GetEthBlockFetchPeriod() int32 {
if x != nil {
return x.EthBlockFetchPeriod
}
return 0
}
func (m *RelayerConfig) GetEthProviderCli() string {
if m != nil {
return m.EthProviderCli
func (x *RelayerConfig) GetEthProviderCli() string {
if x != nil {
return x.EthProviderCli
}
return ""
}
func (m *RelayerConfig) GetBridgeRegistryOnChain33() string {
if m != nil {
return m.BridgeRegistryOnChain33
func (x *RelayerConfig) GetBridgeRegistryOnChain33() string {
if x != nil {
return x.BridgeRegistryOnChain33
}
return ""
}
func (m *RelayerConfig) GetChainName() string {
if m != nil {
return m.ChainName
func (x *RelayerConfig) GetChainName() string {
if x != nil {
return x.ChainName
}
return ""
}
func (m *RelayerConfig) GetChainID4Chain33() int32 {
if m != nil {
return m.ChainID4Chain33
func (x *RelayerConfig) GetChainID4Chain33() int32 {
if x != nil {
return x.ChainID4Chain33
}
return 0
}
type SyncTxReceiptConfig struct {
Chain33Host string `protobuf:"bytes,1,opt,name=chain33host,proto3" json:"chain33host,omitempty"`
PushHost string `protobuf:"bytes,2,opt,name=pushHost,proto3" json:"pushHost,omitempty"`
PushName string `protobuf:"bytes,3,opt,name=pushName,proto3" json:"pushName,omitempty"`
PushBind string `protobuf:"bytes,4,opt,name=pushBind,proto3" json:"pushBind,omitempty"`
StartSyncHeight int64 `protobuf:"varint,5,opt,name=startSyncHeight,proto3" json:"startSyncHeight,omitempty"`
StartSyncSequence int64 `protobuf:"varint,6,opt,name=startSyncSequence,proto3" json:"startSyncSequence,omitempty"`
StartSyncHash string `protobuf:"bytes,7,opt,name=startSyncHash,proto3" json:"startSyncHash,omitempty"`
Contracts []string `protobuf:"bytes,8,rep,name=contracts,proto3" json:"contracts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SyncTxReceiptConfig) Reset() { *m = SyncTxReceiptConfig{} }
func (m *SyncTxReceiptConfig) String() string { return proto.CompactTextString(m) }
func (*SyncTxReceiptConfig) ProtoMessage() {}
func (*SyncTxReceiptConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{3}
}
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
func (m *SyncTxReceiptConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SyncTxReceiptConfig.Unmarshal(m, b)
}
func (m *SyncTxReceiptConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SyncTxReceiptConfig.Marshal(b, m, deterministic)
Chain33Host string `protobuf:"bytes,1,opt,name=chain33host,proto3" json:"chain33host,omitempty"`
PushHost string `protobuf:"bytes,2,opt,name=pushHost,proto3" json:"pushHost,omitempty"`
PushName string `protobuf:"bytes,3,opt,name=pushName,proto3" json:"pushName,omitempty"`
PushBind string `protobuf:"bytes,4,opt,name=pushBind,proto3" json:"pushBind,omitempty"`
StartSyncHeight int64 `protobuf:"varint,5,opt,name=startSyncHeight,proto3" json:"startSyncHeight,omitempty"`
StartSyncSequence int64 `protobuf:"varint,6,opt,name=startSyncSequence,proto3" json:"startSyncSequence,omitempty"`
StartSyncHash string `protobuf:"bytes,7,opt,name=startSyncHash,proto3" json:"startSyncHash,omitempty"`
Contracts []string `protobuf:"bytes,8,rep,name=contracts,proto3" json:"contracts,omitempty"`
}
func (m *SyncTxReceiptConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncTxReceiptConfig.Merge(m, src)
func (x *SyncTxReceiptConfig) Reset() {
*x = SyncTxReceiptConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *SyncTxReceiptConfig) XXX_Size() int {
return xxx_messageInfo_SyncTxReceiptConfig.Size(m)
func (x *SyncTxReceiptConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (m *SyncTxReceiptConfig) XXX_DiscardUnknown() {
xxx_messageInfo_SyncTxReceiptConfig.DiscardUnknown(m)
func (*SyncTxReceiptConfig) ProtoMessage() {}
func (x *SyncTxReceiptConfig) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var xxx_messageInfo_SyncTxReceiptConfig proto.InternalMessageInfo
// Deprecated: Use SyncTxReceiptConfig.ProtoReflect.Descriptor instead.
func (*SyncTxReceiptConfig) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{3}
}
func (m *SyncTxReceiptConfig) GetChain33Host() string {
if m != nil {
return m.Chain33Host
func (x *SyncTxReceiptConfig) GetChain33Host() string {
if x != nil {
return x.Chain33Host
}
return ""
}
func (m *SyncTxReceiptConfig) GetPushHost() string {
if m != nil {
return m.PushHost
func (x *SyncTxReceiptConfig) GetPushHost() string {
if x != nil {
return x.PushHost
}
return ""
}
func (m *SyncTxReceiptConfig) GetPushName() string {
if m != nil {
return m.PushName
func (x *SyncTxReceiptConfig) GetPushName() string {
if x != nil {
return x.PushName
}
return ""
}
func (m *SyncTxReceiptConfig) GetPushBind() string {
if m != nil {
return m.PushBind
func (x *SyncTxReceiptConfig) GetPushBind() string {
if x != nil {
return x.PushBind
}
return ""
}
func (m *SyncTxReceiptConfig) GetStartSyncHeight() int64 {
if m != nil {
return m.StartSyncHeight
func (x *SyncTxReceiptConfig) GetStartSyncHeight() int64 {
if x != nil {
return x.StartSyncHeight
}
return 0
}
func (m *SyncTxReceiptConfig) GetStartSyncSequence() int64 {
if m != nil {
return m.StartSyncSequence
func (x *SyncTxReceiptConfig) GetStartSyncSequence() int64 {
if x != nil {
return x.StartSyncSequence
}
return 0
}
func (m *SyncTxReceiptConfig) GetStartSyncHash() string {
if m != nil {
return m.StartSyncHash
func (x *SyncTxReceiptConfig) GetStartSyncHash() string {
if x != nil {
return x.StartSyncHash
}
return ""
}
func (m *SyncTxReceiptConfig) GetContracts() []string {
if m != nil {
return m.Contracts
func (x *SyncTxReceiptConfig) GetContracts() []string {
if x != nil {
return x.Contracts
}
return nil
}
type Deploy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//操作管理员地址
OperatorAddr string `protobuf:"bytes,1,opt,name=operatorAddr,proto3" json:"operatorAddr,omitempty"`
//合约部署人员私钥,用于部署合约时签名使用
......@@ -513,123 +553,307 @@ type Deploy struct {
//验证人地址
ValidatorsAddr []string `protobuf:"bytes,3,rep,name=validatorsAddr,proto3" json:"validatorsAddr,omitempty"`
//验证人权重
InitPowers []int64 `protobuf:"varint,4,rep,packed,name=initPowers,proto3" json:"initPowers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
InitPowers []int64 `protobuf:"varint,4,rep,packed,name=initPowers,proto3" json:"initPowers,omitempty"`
}
func (m *Deploy) Reset() { *m = Deploy{} }
func (m *Deploy) String() string { return proto.CompactTextString(m) }
func (*Deploy) ProtoMessage() {}
func (*Deploy) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{4}
func (x *Deploy) Reset() {
*x = Deploy{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (m *Deploy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Deploy.Unmarshal(m, b)
}
func (m *Deploy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Deploy.Marshal(b, m, deterministic)
}
func (m *Deploy) XXX_Merge(src proto.Message) {
xxx_messageInfo_Deploy.Merge(m, src)
}
func (m *Deploy) XXX_Size() int {
return xxx_messageInfo_Deploy.Size(m)
func (x *Deploy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (m *Deploy) XXX_DiscardUnknown() {
xxx_messageInfo_Deploy.DiscardUnknown(m)
func (*Deploy) ProtoMessage() {}
func (x *Deploy) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var xxx_messageInfo_Deploy proto.InternalMessageInfo
// Deprecated: Use Deploy.ProtoReflect.Descriptor instead.
func (*Deploy) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{4}
}
func (m *Deploy) GetOperatorAddr() string {
if m != nil {
return m.OperatorAddr
func (x *Deploy) GetOperatorAddr() string {
if x != nil {
return x.OperatorAddr
}
return ""
}
func (m *Deploy) GetDeployerPrivateKey() string {
if m != nil {
return m.DeployerPrivateKey
func (x *Deploy) GetDeployerPrivateKey() string {
if x != nil {
return x.DeployerPrivateKey
}
return ""
}
func (m *Deploy) GetValidatorsAddr() []string {
if m != nil {
return m.ValidatorsAddr
func (x *Deploy) GetValidatorsAddr() []string {
if x != nil {
return x.ValidatorsAddr
}
return nil
}
func (m *Deploy) GetInitPowers() []int64 {
if m != nil {
return m.InitPowers
func (x *Deploy) GetInitPowers() []int64 {
if x != nil {
return x.InitPowers
}
return nil
}
func init() {
proto.RegisterType((*SyncTxConfig)(nil), "types.SyncTxConfig")
proto.RegisterType((*Log)(nil), "types.Log")
proto.RegisterType((*RelayerConfig)(nil), "types.RelayerConfig")
proto.RegisterType((*SyncTxReceiptConfig)(nil), "types.SyncTxReceiptConfig")
proto.RegisterType((*Deploy)(nil), "types.Deploy")
}
func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) }
var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 766 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xdd, 0x6e, 0xdb, 0x36,
0x14, 0x86, 0xa3, 0xd8, 0xb1, 0x68, 0x2b, 0xc3, 0x98, 0x61, 0x13, 0x86, 0x60, 0x30, 0x8c, 0x6d,
0xf0, 0xc5, 0x60, 0x0c, 0x49, 0x86, 0xed, 0x36, 0x71, 0x10, 0x64, 0x68, 0xd2, 0x1a, 0x4c, 0x5e,
0x80, 0xa6, 0x4e, 0x24, 0x36, 0xb4, 0xa8, 0x52, 0xb4, 0x6b, 0xf7, 0x79, 0x0a, 0xf4, 0x39, 0x7a,
0xd7, 0xeb, 0x3e, 0x51, 0xc1, 0x23, 0xd9, 0x96, 0x15, 0x17, 0x6d, 0xaf, 0x7a, 0xa7, 0xef, 0xfb,
0x0e, 0x8e, 0x79, 0x7e, 0xbe, 0x63, 0xd2, 0x15, 0x3a, 0x7d, 0x90, 0xf1, 0x30, 0x33, 0xda, 0x6a,
0xda, 0xb4, 0xcb, 0x0c, 0xf2, 0xfe, 0x07, 0x8f, 0x74, 0xef, 0x96, 0xa9, 0xb8, 0x5f, 0x8c, 0x50,
0xa5, 0x3d, 0xd2, 0x11, 0x09, 0x97, 0xe9, 0xe9, 0x69, 0xa2, 0x73, 0x1b, 0x36, 0x7a, 0x8d, 0x81,
0xcf, 0xaa, 0x14, 0xfd, 0x95, 0xb4, 0xb3, 0x59, 0x9e, 0x5c, 0x3b, 0x79, 0x0f, 0xe5, 0x35, 0x5e,
0x69, 0xcf, 0xf9, 0x14, 0x42, 0x6f, 0xa3, 0x39, 0xbc, 0xd2, 0x2e, 0x64, 0x1a, 0x85, 0xfb, 0x1b,
0xcd, 0x61, 0xfa, 0x27, 0x39, 0x9c, 0x72, 0x3b, 0x33, 0xd2, 0x2e, 0x2f, 0x21, 0x36, 0x00, 0x61,
0xb3, 0xd7, 0x18, 0x34, 0x59, 0x8d, 0x75, 0x39, 0xa2, 0x49, 0x64, 0xe4, 0x1c, 0x4c, 0xd8, 0x2a,
0x72, 0xac, 0x30, 0xfd, 0x99, 0xb4, 0xa2, 0xc9, 0x98, 0xdb, 0x24, 0x3c, 0x40, 0xa5, 0x44, 0x34,
0x24, 0x07, 0xd1, 0x64, 0xc4, 0x45, 0x02, 0x61, 0x1b, 0x93, 0xae, 0x20, 0xfd, 0x9b, 0x1c, 0x3d,
0x80, 0x15, 0xc9, 0x35, 0xc8, 0x38, 0xb1, 0x63, 0x30, 0x52, 0x47, 0xb7, 0x79, 0xe8, 0xf7, 0x1a,
0x03, 0x8f, 0xed, 0x92, 0xe8, 0x80, 0xfc, 0x90, 0x5b, 0x6e, 0xac, 0x6b, 0x59, 0x21, 0x85, 0x04,
0xa3, 0xeb, 0x34, 0xfd, 0x8b, 0xfc, 0xb8, 0xa6, 0xee, 0xe0, 0xd5, 0x0c, 0x52, 0x01, 0x61, 0x07,
0x63, 0x9f, 0x0a, 0xf4, 0x77, 0x12, 0x6c, 0x12, 0xf0, 0x3c, 0x09, 0xbb, 0x58, 0xc2, 0x36, 0x49,
0x8f, 0x89, 0x2f, 0x74, 0x6a, 0x0d, 0x17, 0x36, 0x0f, 0x83, 0x9e, 0x37, 0xf0, 0xd9, 0x86, 0xe8,
0xbf, 0xdf, 0x23, 0xde, 0x8d, 0x8e, 0x5d, 0x8f, 0x94, 0x8e, 0x15, 0xcc, 0x41, 0x95, 0xe3, 0x5b,
0x63, 0xf7, 0x7e, 0xa5, 0xe3, 0x91, 0x4e, 0x73, 0xad, 0xe0, 0x06, 0x43, 0x8a, 0x11, 0xd6, 0x69,
0xd7, 0x35, 0xa5, 0xe3, 0x2b, 0xa9, 0x56, 0x83, 0x5c, 0x41, 0xb7, 0x21, 0x53, 0xbe, 0x70, 0x9f,
0x77, 0xf2, 0x0d, 0xe0, 0x28, 0x03, 0x56, 0xa5, 0xe8, 0x6f, 0x84, 0x4c, 0xf9, 0xe2, 0x82, 0x8b,
0xc7, 0x59, 0x96, 0xe3, 0x24, 0x03, 0x56, 0x61, 0xdc, 0xa4, 0xa6, 0x7c, 0x71, 0x1e, 0x03, 0xce,
0x30, 0x60, 0x25, 0x72, 0xf5, 0x29, 0x2d, 0xb8, 0xba, 0x97, 0x53, 0xc0, 0x21, 0xb6, 0xd9, 0x86,
0x70, 0x75, 0x09, 0x3d, 0xcd, 0x0c, 0xe4, 0x39, 0x0e, 0xb2, 0xcd, 0xd6, 0xd8, 0xfd, 0xa2, 0xe0,
0x4a, 0x81, 0xc1, 0x07, 0xfb, 0xa8, 0x56, 0x18, 0xb7, 0x5f, 0x25, 0x9a, 0xa5, 0xc2, 0x4a, 0x9d,
0xe2, 0xd8, 0xda, 0xac, 0xc6, 0xf6, 0x3f, 0xee, 0x93, 0x80, 0x81, 0xe2, 0x4b, 0x30, 0xa5, 0x1f,
0x7e, 0x22, 0x4d, 0x2b, 0xad, 0x82, 0xb2, 0x95, 0x05, 0xa0, 0xff, 0x92, 0x6e, 0x5e, 0x71, 0x0d,
0x36, 0xb1, 0x73, 0x72, 0x34, 0x44, 0x53, 0x0d, 0xab, 0x86, 0x62, 0x5b, 0x81, 0xf4, 0x98, 0x78,
0x4a, 0xc7, 0xd8, 0xd2, 0xce, 0x09, 0x29, 0xe3, 0x6f, 0x74, 0xcc, 0x1c, 0x4d, 0xfb, 0xa4, 0xfb,
0xd2, 0x64, 0xc2, 0x59, 0xe2, 0x3c, 0x8a, 0x4c, 0x69, 0x93, 0x2d, 0xce, 0xb5, 0x1f, 0x6c, 0x32,
0x36, 0x7a, 0x2e, 0x23, 0x30, 0xd8, 0x5d, 0x9f, 0x55, 0x29, 0x57, 0xec, 0xc4, 0xc8, 0x28, 0x06,
0x06, 0xb1, 0xcc, 0xad, 0x59, 0x96, 0x56, 0xa9, 0xb1, 0xf4, 0x0f, 0xd2, 0x8a, 0x20, 0x53, 0x7a,
0x89, 0xbd, 0xee, 0x9c, 0x04, 0xe5, 0x73, 0x2e, 0x91, 0x64, 0xa5, 0x48, 0xff, 0x21, 0x87, 0xc5,
0xd7, 0x59, 0x79, 0x05, 0xb0, 0xfb, 0x4f, 0xc2, 0x6b, 0x41, 0xce, 0x00, 0x60, 0x93, 0xdb, 0x6d,
0x57, 0xfb, 0x68, 0xc0, 0xa7, 0x82, 0xb3, 0x22, 0xd8, 0xe4, 0x42, 0x69, 0xf1, 0x78, 0xe5, 0x7c,
0x57, 0x38, 0x0e, 0xa7, 0xd4, 0x64, 0xbb, 0x24, 0x57, 0x65, 0xa5, 0xe8, 0x91, 0x92, 0xe8, 0x2e,
0x9f, 0xd5, 0x58, 0xfa, 0x1f, 0xf9, 0x65, 0xbb, 0xee, 0x17, 0xe9, 0xa8, 0xac, 0xa3, 0x30, 0xd9,
0xe7, 0x64, 0xb4, 0x9b, 0xfb, 0xc4, 0x6b, 0x16, 0x60, 0xec, 0x86, 0x70, 0x56, 0x42, 0xf0, 0xff,
0xe5, 0xd9, 0x2a, 0xdf, 0x21, 0xbe, 0xb6, 0x4e, 0xf7, 0xdf, 0xed, 0x91, 0xa3, 0x62, 0x25, 0x18,
0x08, 0x90, 0x99, 0xfd, 0xae, 0xa7, 0x76, 0xc7, 0x09, 0x6b, 0x7e, 0xc3, 0x09, 0x6b, 0x7d, 0xf5,
0x09, 0x3b, 0xf8, 0xe2, 0x09, 0x6b, 0xd7, 0x4f, 0xd8, 0xdb, 0x06, 0x69, 0x15, 0xeb, 0xe4, 0xac,
0xa0, 0x33, 0x30, 0xdc, 0x6a, 0x83, 0x56, 0x28, 0xba, 0xb3, 0xc5, 0xd1, 0x21, 0xa1, 0xc5, 0xd2,
0x81, 0x19, 0x1b, 0x39, 0xe7, 0x16, 0x9e, 0xc1, 0xb2, 0x6c, 0xd4, 0x0e, 0xc5, 0xad, 0xcc, 0x9c,
0x2b, 0x19, 0xb9, 0x04, 0x39, 0x66, 0xf5, 0xf0, 0x05, 0x35, 0xd6, 0x5d, 0x13, 0x99, 0x4a, 0x3b,
0xd6, 0xaf, 0xc1, 0xe4, 0xe1, 0x7e, 0xcf, 0x1b, 0x78, 0xac, 0xc2, 0x4c, 0x5a, 0xf8, 0x17, 0x7a,
0xfa, 0x29, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x6b, 0x7a, 0x9f, 0x52, 0x07, 0x00, 0x00,
var File_config_proto protoreflect.FileDescriptor
var file_config_proto_rawDesc = []byte{
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05,
0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xc8, 0x03, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x78,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x33,
0x33, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x33, 0x33, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68,
0x48, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68,
0x48, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x42, 0x69, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x42, 0x69, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0e,
0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65,
0x67, 0x72, 0x65, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x62, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x62, 0x50, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x64, 0x62, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x62, 0x43, 0x61,
0x63, 0x68, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x62, 0x43, 0x61, 0x63,
0x68, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x66, 0x65, 0x74, 0x63, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68,
0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
0x13, 0x66, 0x65, 0x74, 0x63, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x65, 0x72, 0x69,
0x6f, 0x64, 0x4d, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e,
0x63, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x73,
0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c,
0x0a, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x71, 0x75, 0x65,
0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74,
0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d,
0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x61,
0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18,
0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73,
0x22, 0xc1, 0x02, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x6c,
0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x6c,
0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x6c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x6f,
0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c,
0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18,
0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x46,
0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d,
0x61, 0x78, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61,
0x78, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61,
0x78, 0x41, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41,
0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01,
0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e,
0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x46, 0x75, 0x6e, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd2, 0x04, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x0c,
0x73, 0x79, 0x6e, 0x63, 0x54, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54,
0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x78, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x03,
0x6c, 0x6f, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x72, 0x70, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x41,
0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x72, 0x70, 0x63, 0x42,
0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x74,
0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x72, 0x69,
0x64, 0x67, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
0x79, 0x12, 0x25, 0x0a, 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79,
0x52, 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c,
0x6f, 0x79, 0x34, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x33, 0x33, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52,
0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x34, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x33, 0x33, 0x12,
0x2c, 0x0a, 0x11, 0x65, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65,
0x67, 0x72, 0x65, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x65, 0x74, 0x68, 0x4d,
0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x67, 0x72, 0x65, 0x65, 0x12, 0x30, 0x0a,
0x13, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x65,
0x72, 0x69, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x65, 0x74, 0x68, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
0x26, 0x0a, 0x0e, 0x65, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6c,
0x69, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x12, 0x38, 0x0a, 0x17, 0x62, 0x72, 0x69, 0x64, 0x67,
0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e,
0x33, 0x33, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,
0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x33,
0x33, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x28, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x34, 0x43, 0x68, 0x61, 0x69, 0x6e,
0x33, 0x33, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49,
0x44, 0x34, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x33, 0x33, 0x22, 0xa7, 0x02, 0x0a, 0x13, 0x53, 0x79,
0x6e, 0x63, 0x54, 0x78, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x33, 0x33, 0x68, 0x6f, 0x73, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x33, 0x33, 0x68,
0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x48, 0x6f, 0x73, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x48, 0x6f, 0x73, 0x74, 0x12,
0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
0x75, 0x73, 0x68, 0x42, 0x69, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
0x75, 0x73, 0x68, 0x42, 0x69, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74,
0x53, 0x79, 0x6e, 0x63, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x65, 0x69, 0x67, 0x68,
0x74, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65,
0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x74,
0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12,
0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x61, 0x73, 0x68,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x79, 0x6e,
0x63, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
0x63, 0x74, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x22,
0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64,
0x64, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x50, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12,
0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b,
0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73,
0x41, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e,
0x69, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a,
0x69, 0x6e, 0x69, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e,
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_config_proto_rawDescOnce sync.Once
file_config_proto_rawDescData = file_config_proto_rawDesc
)
func file_config_proto_rawDescGZIP() []byte {
file_config_proto_rawDescOnce.Do(func() {
file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData)
})
return file_config_proto_rawDescData
}
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_config_proto_goTypes = []interface{}{
(*SyncTxConfig)(nil), // 0: types.SyncTxConfig
(*Log)(nil), // 1: types.Log
(*RelayerConfig)(nil), // 2: types.RelayerConfig
(*SyncTxReceiptConfig)(nil), // 3: types.SyncTxReceiptConfig
(*Deploy)(nil), // 4: types.Deploy
}
var file_config_proto_depIdxs = []int32{
0, // 0: types.RelayerConfig.syncTxConfig:type_name -> types.SyncTxConfig
1, // 1: types.RelayerConfig.log:type_name -> types.Log
4, // 2: types.RelayerConfig.deploy:type_name -> types.Deploy
4, // 3: types.RelayerConfig.deploy4chain33:type_name -> types.Deploy
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_config_proto_init() }
func file_config_proto_init() {
if File_config_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncTxConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Log); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RelayerConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncTxReceiptConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Deploy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_config_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_config_proto_goTypes,
DependencyIndexes: file_config_proto_depIdxs,
MessageInfos: file_config_proto_msgTypes,
}.Build()
File_config_proto = out.File
file_config_proto_rawDesc = nil
file_config_proto_goTypes = nil
file_config_proto_depIdxs = nil
}
......@@ -16,7 +16,7 @@ const (
Tx_Status_Failed = "Failed"
Source_Chain_Ethereum = int32(0)
Source_Chain_Chain33 = int32(1)
Invalid_Tx_Index = int64(-1)
Invalid_Tx_Index = int64(0)
Invalid_Chain33Tx_Status = int32(-1)
)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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