syntax = "proto3";

package types;

message SyncTxConfig {
  string chain33host = 1;
  string pushHost = 2;
  string pushName = 3;
  string pushBind = 4;
  int32 maturityDegree = 5;
  string dbdriver = 6; //数据库类型
  string dbPath = 7;   //数据库存储目录
  int32 dbCache = 8;   //数据库缓存大小
  int64 fetchHeightPeriodMs = 9;
  int64 startSyncHeight     = 10;
  int64 startSyncSequence   = 11;
  string startSyncHash      = 12;
}

message Log {
  string loglevel = 1;
  string logConsoleLevel = 2;
  string logFile = 3;
  uint32 maxFileSize = 4;
  uint32 maxBackups = 5;
  uint32 maxAge = 6;
  bool localTime = 7;
  bool compress = 8;
  bool callerFile = 9;
  bool callerFunction = 10;
}

message RelayerConfig {
  string title = 1;
  SyncTxConfig syncTxConfig = 2;
  Log log = 3;
  string jrpcBindAddr = 4; // Jrpc服务地址
  string ethProvider  = 5;
  string bridgeRegistry = 6;
  Deploy deploy = 7;
  int32 ethMaturityDegree = 8;
  int32 ethBlockFetchPeriod = 9;
  string ethProviderCli  = 10;
}

message SyncTxReceiptConfig {
  string chain33host = 1;
  string pushHost = 2;
  string pushName = 3;
  string pushBind = 4;
  int64 startSyncHeight     = 5;
  int64 startSyncSequence   = 6;
  string startSyncHash      = 7;
}

message Deploy {
  //操作管理员地址
  string operatorAddr = 1;
  //合约部署人员私钥，用于部署合约时签名使用
  string deployerPrivateKey = 2;
  //验证人地址
  repeated string validatorsAddr  = 3;
  //验证人权重
  repeated int64 initPowers = 4;
}