-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from ElrondNetwork/separate-configs-for-bridges
Separate configs file for bridges
- Loading branch information
Showing
3 changed files
with
184 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
[Eth] | ||
NetworkAddress = "http://127.0.0.1:8545" # a network address | ||
BridgeAddress = "3009d97FfeD62E57d444e552A9eDF9Ee6Bc8644c" # the eth address for the bridge contract | ||
SafeContractAddress = "A6504Cc508889bbDBd4B748aFf6EA6b5D0d2684c" | ||
PrivateKeyFile = "config/ethereum.sk" # the path to the file containing the relayer eth private key | ||
GasLimit = 500000 | ||
ERC20Contracts = ["d1135C0307CEB01FD4728db8e5B8D38fbf984F9a"] | ||
[Eth.GasStation] | ||
Enabled = false | ||
URL = "https://ethgasstation.info/api/ethgasAPI.json?" # gas station URL. Suggestion to provide the api-key here | ||
PollingIntervalInSeconds = 60 # number of seconds between gas price polling | ||
RequestTimeInSeconds = 2 # maximum timeout (in seconds) for the gas price request | ||
MaximumAllowedGasPrice = 3000 # maximum value allowed for the fetched gas price value | ||
# GasPriceSelector available options: "fast", "fastest", "safeLow", "average" | ||
GasPriceSelector = "safeLow" # selector used to provide the gas price | ||
|
||
[Elrond] | ||
NetworkAddress = "https://devnet-gateway.elrond.com" # the network address | ||
BridgeAddress = "erd1qqqqqqqqqqqqqpgqzyuaqg3dl7rqlkudrsnm5ek0j3a97qevd8sszj0glf" # the elrond address for the bridge contract | ||
PrivateKeyFile = "config/elrond.pem" # the path to the pem file containing the relayer elrond wallet | ||
IntervalToResendTxsInSeconds = 60 # the time in seconds between nonce reads | ||
[Elrond.GasMap] | ||
Sign = 8000000 | ||
ProposeTransferBase = 11000000 | ||
ProposeTransferForEach = 3000000 | ||
ProposeStatus = 30000000 | ||
PerformActionBase = 25000000 | ||
PerformActionForEach = 2000000 | ||
|
||
[P2P] | ||
Port = "10010" | ||
Seed = "" | ||
InitialPeerList = [] | ||
ProtocolID = "/erd/relay/2.0.0" | ||
|
||
[Relayer] | ||
[Relayer.Marshalizer] | ||
Type = "gogo protobuf" | ||
SizeCheckDelta = 10 | ||
[Relayer.RoleProvider] | ||
UsePolling = true | ||
PollingIntervalInMillis = 60000 # 1 minute | ||
[Relayer.StatusMetricsStorage] | ||
[Relayer.StatusMetricsStorage.Cache] | ||
Name = "StatusMetricsStorage" | ||
Capacity = 1000 | ||
Type = "LRU" | ||
[Relayer.StatusMetricsStorage.DB] | ||
FilePath = "StatusMetricsStorageDB" | ||
Type = "LvlDBSerial" | ||
BatchDelaySeconds = 2 | ||
MaxBatchSize = 100 | ||
MaxOpenFiles = 10 | ||
|
||
[StateMachine] | ||
[StateMachine.EthToElrond] | ||
StepDurationInMillis = 6000 | ||
Steps = [ | ||
{ Name = "getting the pending transactions", DurationInMillis = 12000 }, | ||
{ Name = "proposing transfer", DurationInMillis = 12000 }, | ||
{ Name = "waiting signatures for propose transfer", DurationInMillis = 12000 }, | ||
{ Name = "executing transfer", DurationInMillis = 12000 }, | ||
{ Name = "proposing set status", DurationInMillis = 120000 }, # 2 minutes | ||
{ Name = "waiting signatures for propose set status", DurationInMillis = 12000 }, | ||
{ Name = "executing set status", DurationInMillis = 12000 } | ||
] | ||
[StateMachine.ElrondToEth] | ||
StepDurationInMillis = 6000 | ||
Steps = [ | ||
{ Name = "getting the pending transactions", DurationInMillis = 12000 }, | ||
{ Name = "proposing transfer", DurationInMillis = 12000 }, | ||
{ Name = "waiting signatures for propose transfer", DurationInMillis = 12000 }, | ||
{ Name = "executing transfer", DurationInMillis = 120000 }, # 2 minutes | ||
{ Name = "proposing set status", DurationInMillis = 12000 }, | ||
{ Name = "waiting signatures for propose set status", DurationInMillis = 12000 }, | ||
{ Name = "executing set status", DurationInMillis = 12000 } | ||
] | ||
[Logs] | ||
LogFileLifeSpanInSec = 86400 # 24h | ||
|
||
[Antiflood] | ||
Enabled = true | ||
[Antiflood.WebServer] | ||
# SimultaneousRequests represents the number of concurrent requests accepted by the web server | ||
# this is a global throttler that acts on all http connections regardless of the originating source | ||
SimultaneousRequests = 100 | ||
# SameSourceRequests defines how many requests are allowed from the same source in the specified | ||
# time frame (SameSourceResetIntervalInSec) | ||
SameSourceRequests = 10000 | ||
# SameSourceResetIntervalInSec time frame between counter reset, in seconds | ||
SameSourceResetIntervalInSec = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
[Eth] | ||
NetworkAddress = "http://127.0.0.1:8545" # a network address | ||
BridgeAddress = "3009d97FfeD62E57d444e552A9eDF9Ee6Bc8644c" # the eth address for the bridge contract | ||
SafeContractAddress = "A6504Cc508889bbDBd4B748aFf6EA6b5D0d2684c" | ||
PrivateKeyFile = "config/ethereum.sk" # the path to the file containing the relayer eth private key | ||
GasLimit = 500000 | ||
ERC20Contracts = ["d1135C0307CEB01FD4728db8e5B8D38fbf984F9a", "214E935c87454e70B415510fBDf8528c1A1363D5"] | ||
[Eth.GasStation] | ||
Enabled = true | ||
URL = "https://ethgasstation.info/api/ethgasAPI.json?" # gas station URL. Suggestion to provide the api-key here | ||
PollingIntervalInSeconds = 60 # number of seconds between gas price polling | ||
RequestTimeInSeconds = 2 # maximum timeout (in seconds) for the gas price request | ||
MaximumAllowedGasPrice = 3000 # maximum value allowed for the fetched gas price value | ||
# GasPriceSelector available options: "fast", "fastest", "safeLow", "average" | ||
GasPriceSelector = "safeLow" # selector used to provide the gas price | ||
|
||
[Elrond] | ||
NetworkAddress = "https://devnet-gateway.elrond.com" # the network address | ||
BridgeAddress = "erd1qqqqqqqqqqqqqpgqzyuaqg3dl7rqlkudrsnm5ek0j3a97qevd8sszj0glf" # the elrond address for the bridge contract | ||
PrivateKeyFile = "config/elrond.pem" # the path to the pem file containing the relayer elrond wallet | ||
IntervalToResendTxsInSeconds = 60 # the time in seconds between nonce reads | ||
[Elrond.GasMap] | ||
Sign = 8000000 | ||
ProposeTransferBase = 11000000 | ||
ProposeTransferForEach = 3000000 | ||
ProposeStatus = 30000000 | ||
PerformActionBase = 25000000 | ||
PerformActionForEach = 2000000 | ||
|
||
[P2P] | ||
Port = "10010" | ||
Seed = "" | ||
InitialPeerList = [] | ||
ProtocolID = "/erd/relay/1.0.0" | ||
|
||
[Relayer] | ||
[Relayer.Marshalizer] | ||
Type = "gogo protobuf" | ||
SizeCheckDelta = 10 | ||
[Relayer.RoleProvider] | ||
UsePolling = true | ||
PollingIntervalInMillis = 60000 # 1 minute | ||
[Relayer.StatusMetricsStorage] | ||
[Relayer.StatusMetricsStorage.Cache] | ||
Name = "StatusMetricsStorage" | ||
Capacity = 1000 | ||
Type = "LRU" | ||
[Relayer.StatusMetricsStorage.DB] | ||
FilePath = "StatusMetricsStorageDB" | ||
Type = "LvlDBSerial" | ||
BatchDelaySeconds = 2 | ||
MaxBatchSize = 100 | ||
MaxOpenFiles = 10 | ||
|
||
[StateMachine] | ||
[StateMachine.EthToElrond] | ||
StepDurationInMillis = 6000 | ||
Steps = [ | ||
{ Name = "getting the pending transactions", DurationInMillis = 12000 }, | ||
{ Name = "proposing transfer", DurationInMillis = 12000 }, | ||
{ Name = "waiting signatures for propose transfer", DurationInMillis = 12000 }, | ||
{ Name = "executing transfer", DurationInMillis = 12000 }, | ||
{ Name = "proposing set status", DurationInMillis = 600000 }, # 10 minutes | ||
{ Name = "waiting signatures for propose set status", DurationInMillis = 12000 }, | ||
{ Name = "executing set status", DurationInMillis = 12000 } | ||
] | ||
[StateMachine.ElrondToEth] | ||
StepDurationInMillis = 6000 | ||
Steps = [ | ||
{ Name = "getting the pending transactions", DurationInMillis = 12000 }, | ||
{ Name = "proposing transfer", DurationInMillis = 12000 }, | ||
{ Name = "waiting signatures for propose transfer", DurationInMillis = 12000 }, | ||
{ Name = "executing transfer", DurationInMillis = 600000 }, # 10 minutes | ||
{ Name = "proposing set status", DurationInMillis = 12000 }, | ||
{ Name = "waiting signatures for propose set status", DurationInMillis = 12000 }, | ||
{ Name = "executing set status", DurationInMillis = 12000 } | ||
] | ||
[Logs] | ||
LogFileLifeSpanInSec = 86400 # 24h | ||
|
||
[Antiflood] | ||
Enabled = true | ||
[Antiflood.WebServer] | ||
# SimultaneousRequests represents the number of concurrent requests accepted by the web server | ||
# this is a global throttler that acts on all http connections regardless of the originating source | ||
SimultaneousRequests = 100 | ||
# SameSourceRequests defines how many requests are allowed from the same source in the specified | ||
# time frame (SameSourceResetIntervalInSec) | ||
SameSourceRequests = 10000 | ||
# SameSourceResetIntervalInSec time frame between counter reset, in seconds | ||
SameSourceResetIntervalInSec = 1 |