-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathconfig-example.toml
229 lines (207 loc) · 6.8 KB
/
config-example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# a short string to identify the bridge
Identifier = "BTC2ETH"
# administrators who can do admin work like maintain blacklist etc.
[Server]
Admins = [
"0x3dfaef310a1044fd7d96750b42b44cf3775c00bf",
"0x46cbe22b687d4b72c8913e4784dfe5b20fdc2b0e"
]
Assistants = [
"0x6666666666666666666666666666666666666666"
]
# account black list of string array
AccountBlackList = []
# send tx loop count until success (use negative to disable loop)
SendTxLoopCount = 30
SendTxLoopInterval = 10
# modgodb database connection config (server only)
[Server.MongoDB]
# DBURLs is prefered if exists. forbids set both DBURL and DBURLs.
#DBURL = "localhost:27017,localhost:12345"
#DBURLs = ["localhost:27017", "localhost:12345"]
DBName = "databasename"
UserName = "username"
Password = "password"
# bridge API service (server only)
[Server.APIServer]
# listen port
Port = 11556
# CORS config
AllowedOrigins = []
# Maximum number of requests to limit per second
MaxRequestsLimit = 10
# token price configed in contract on chain
[TokenPrice]
Contract = "0x1111111111111111111111111111111111111111"
APIAddress = ["http://127.0.0.1:8711", "http://127.0.0.1:8722"]
# oracle config (oracle only)
[Oracle]
# post swap register RPC requests to this server
ServerAPIAddress = "http://127.0.0.1:11556/rpc"
# don't check server connection
NoCheckServerConnection = false
# getting accept list interval in accept job
GetAcceptListInterval = 20
# when meet invalid accept, ignore it instead of disagree it immediately
PendingInvalidAccept = false
# customize fees in building btc transaction (btc only)
[BtcExtra]
# minimum relay fee of tx
MinRelayFee = 400
# relay fee per kilobytes
MinRelayFeePerKb = 2000
# maximum relay fee per kilobytes
MaxRelayFeePerKb = 500000
# plus percentage of estimate fee to speed tx packing
PlusFeePercentage = 0
# estimate smart fee with such many target blocks
EstimateFeeBlocks = 6
# aggregate if have more than so many utxos
UtxoAggregateMinCount = 20
# aggregate if have more than so many value
UtxoAggregateMinValue = 1000000 # unit satoshi
# aggreate to this address
UtxoAggregateToAddress = "mfwPnCuht2b4Lvb5XTds4Rvzy3jZ2ZWrBL"
# extra config
[Extra]
IsTestMode = false
IsDebugMode = false
MustRegisterAccount = false
IsSwapoutToStringAddress = false
EnableCheckBlockFork = false
IsNullSwapoutNativeMemo = false
UsePendingBalance = false
CheckBindAddrIsContract = false
# source chain config
[SrcChain]
BlockChain = "Bitcoin"
NetID = "TestNet3"
# tx should be in chain with at least so many confirmations to be valid on source chain
Confirmations = 0 # suggest >= 6 for Mainnet
# only tx with block height >= this initial height should be considered valid on source chain
InitialHeight = 0
# whether enable scan blocks and register swaps
EnableScan = false
# whether enable scan txs in pool
EnableScanPool = false
# enable pass big value swap job
EnablePassBigValue = false
# enable check tx block hash (prevent in orphan block)
EnableCheckTxBlockHash = false
# enable check tx block index (prevent in orphan block)
EnableCheckTxBlockIndex = false
# enable replace swap job
EnableReplaceSwap = false
# enable building dynamic fee tx
EnableDynamicFeeTx = false
# whether scan transaction receipt logs
ScanReceipt = false
# max gas price fluct percent
MaxGasPriceFluctPercent = 10
# extra added gas price percent for replace swap
ReplacePlusGasPricePercent = 1
# wait time to replace swapout match tx
WaitTimeToReplace = 900
# max replace swap count
MaxReplaceCount = 20
# check address mixed case
IgnoreCheckAddressMixedCase = false
# source blockchain gateway config
[SrcGateway]
APIAddress = ["http://47.107.50.83:3002"]
APIAddressExt = ["http://47.107.50.83:3000"]
# dest chain config
[DestChain]
BlockChain = "Ethereum"
NetID = "Rinkeby"
# tx should be in chain with at least so many confirmations to be valid on source chain
Confirmations = 0 # suggest >= 30 for Mainnet
# only tx with block height >= this initial height should be considered valid on source chain
InitialHeight = 0
# whether enable scan blocks and register swaps
EnableScan = false
# whether enable scan txs in pool
EnableScanPool = false
# enable pass big value swap job
EnablePassBigValue = false
# enable check tx block hash (prevent in orphan block)
EnableCheckTxBlockHash = false
# enable check tx block index (prevent in orphan block)
EnableCheckTxBlockIndex = false
# enable replace swap job
EnableReplaceSwap = false
# enable building dynamic fee tx
EnableDynamicFeeTx = false
# base fee percent, must be in range [-90, 500]
BaseFeePercent = 0
# max gas price fluct percent
MaxGasPriceFluctPercent = 10
# extra added gas price percent for replace swap
ReplacePlusGasPricePercent = 1
# wait time to replace swapin match tx
WaitTimeToReplace = 900
# max replace swap count
MaxReplaceCount = 20
# use fixed gas price (no adjust)
FixedGasPrice = "5000000001"
# maximum gas price
MaxGasPrice = "50000000000"
# minimum reserve coin for gas provide (defaults to 1e17 wei)
MinReserveFee = "100000000000000000"
# dynamic fee tx related (EIP-1559)
PlusGasTipCapPercent = 10
PlusGasFeeCapPercent = 10
BlockCountFeeHistory = 3
MaxGasTipCap = "5000000000"
MaxGasFeeCap = "10000000000"
# allow call by contract
AllowCallByContract = false
# call by contract whitelist
CallByContractWhitelist = [
"0x1111111111111111111111111111111111111111",
"0x2222222222222222222222222222222222222222"
]
# call by contract code hash whitelist
CallByContractCodeHashWhitelist = [
"0x1111111111111111111111111111111111111111111111111111111111111111"
]
# dest blockchain gateway config
[DestGateway]
APIAddress = ["http://5.189.139.168:8018"]
APIAddressExt = ["http://5.189.139.168:8000"]
# DCRM config
[Dcrm]
# disable flag
Disable = false
# RPC API prefix
APIPrefix = "dcrm_"
# RPC timeout
RPCTimeout = 10
# sign timeout of seconds
SignTimeout = 120
# verify signature in accept sign info
VerifySignatureInAccept = false
# dcrm group ID
GroupID = "74245ef03937fa75b979bdaa6a5952a93f53e021e0832fca4c2ad8952572c9b70f49e291de7e024b0f7fc54ec5875210db2ac775dba44448b3972b75af074d17"
# dcrm threshold (NeededOracles=2,TotalOracles=3 represent '2/3' threshold)
NeededOracles = 2
TotalOracles = 3
# dcrm mode (0:managed 1:private)
Mode = 0
# initiators of dcrm sign
Initiators = [
"0x00c37841378920E2BA5151a5d1E074Cf367586c4",
"0x897a9980808a2cae0d09ff693f02a4f80abb2233"
]
# DCRM default node config
[Dcrm.DefaultNode]
# dcrm sub groups for signing (server only)
SignGroups = [
"38a93f457c793ac3ee242b2c050a403774738e6558cfaa620fe5577bb15a28f63c39adcc0778497e5009a9ee776a0778ffcad4e95827e69efa21b893b8a78793",
"bb1dfe1ec046cc3a3b88408ae03976aabffe459b40e5def09e76f5d4c7a917133241da9da7fc05e3e172fab54ce3129a9a492d52a5a09494d0b9c1e608f661bf"
]
# dcrm user keystore and password file (suggest using absolute path)
KeystoreFile = "/home/xxx/accounts/keystore1"
PasswordFile = "/home/xxx/accounts/password1"
# dcrm backend node (gdcrm node RPC address)
RPCAddress = "http://127.0.0.1:2921"