-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: lower the gas price multiplier for evm chains (#1881)
* lower the gas price multiplier for evm chains * moved constants into zetaclient * created compliance package and move gas price multiplier function to zetabridge package
- Loading branch information
1 parent
337e485
commit 80a42da
Showing
16 changed files
with
195 additions
and
74 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
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
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
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,9 @@ | ||
package common | ||
|
||
const ( | ||
// EVMOuttxGasPriceMultiplier is the default gas price multiplier for EVM-chain outbond txs | ||
EVMOuttxGasPriceMultiplier = 1.2 | ||
|
||
// BTCOuttxGasPriceMultiplier is the default gas price multiplier for BTC outbond txs | ||
BTCOuttxGasPriceMultiplier = 2.0 | ||
) |
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,18 @@ | ||
package common | ||
|
||
import ( | ||
"github.com/rs/zerolog" | ||
"github.com/rs/zerolog/log" | ||
) | ||
|
||
type ClientLogger struct { | ||
Std zerolog.Logger | ||
Compliance zerolog.Logger | ||
} | ||
|
||
func DefaultLoggers() ClientLogger { | ||
return ClientLogger{ | ||
Std: log.Logger, | ||
Compliance: log.Logger, | ||
} | ||
} |
15 changes: 1 addition & 14 deletions
15
zetaclient/common/utils.go → zetaclient/compliance/compliance.go
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
2 changes: 1 addition & 1 deletion
2
zetaclient/common/utils_test.go → zetaclient/compliance/compliance_test.go
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package common | ||
package compliance | ||
|
||
import ( | ||
"path" | ||
|
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
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,43 @@ | ||
package zetabridge | ||
|
||
const ( | ||
// DefaultGasLimit is the default gas limit used for broadcasting txs | ||
DefaultGasLimit = 200_000 | ||
|
||
// PostGasPriceGasLimit is the gas limit for voting new gas price | ||
PostGasPriceGasLimit = 1_500_000 | ||
|
||
// AddTxHashToOutTxTrackerGasLimit is the gas limit for adding tx hash to out tx tracker | ||
AddTxHashToOutTxTrackerGasLimit = 200_000 | ||
|
||
// PostBlameDataGasLimit is the gas limit for voting on blames | ||
PostBlameDataGasLimit = 200_000 | ||
|
||
// DefaultRetryCount is the number of retries for broadcasting a tx | ||
DefaultRetryCount = 5 | ||
|
||
// ExtendedRetryCount is an extended number of retries for broadcasting a tx, used in keygen operations | ||
ExtendedRetryCount = 15 | ||
|
||
// DefaultRetryInterval is the interval between retries in seconds | ||
DefaultRetryInterval = 5 | ||
|
||
// MonitorVoteInboundTxResultInterval is the interval between retries for monitoring tx result in seconds | ||
MonitorVoteInboundTxResultInterval = 5 | ||
|
||
// MonitorVoteInboundTxResultRetryCount is the number of retries to fetch monitoring tx result | ||
MonitorVoteInboundTxResultRetryCount = 20 | ||
|
||
// PostVoteOutboundGasLimit is the gas limit for voting on observed outbound tx | ||
PostVoteOutboundGasLimit = 400_000 | ||
|
||
// PostVoteOutboundRevertGasLimit is the gas limit for voting on observed outbound tx for revert (when outbound fails) | ||
// The value needs to be higher because reverting implies interacting with the EVM to perform swaps for the gas token | ||
PostVoteOutboundRevertGasLimit = 1_500_000 | ||
|
||
// MonitorVoteOutboundTxResultInterval is the interval between retries for monitoring tx result in seconds | ||
MonitorVoteOutboundTxResultInterval = 5 | ||
|
||
// MonitorVoteOutboundTxResultRetryCount is the number of retries to fetch monitoring tx result | ||
MonitorVoteOutboundTxResultRetryCount = 20 | ||
) |
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
Oops, something went wrong.