Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Monad Testnet Config and Error Mapping #15993

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/three-meals-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added Monad Testnet Config
23 changes: 23 additions & 0 deletions ccip/config/evm/Monad_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ChainID = '10143'
# finality_depth was: 0
FinalityDepth = 10
Copy link
Contributor

@simsonraj simsonraj Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did the finality committee approve the number?

Copy link
Contributor Author

@flodesi flodesi Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't reached out, was going off a previous conversation I had with @fernandezlautaro regarding finality where a chain with instant finality we default to using a finality depth of 10 (example being sei). Please let me know if I should

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please atleast make them aware, Max would be a good person to start with

# block_time was: 1s, adding 1 second buffer
LogPollInterval = '2s'
# No WS Support
LogBroadcasterEnabled = false
FinalityTagEnabled = false
# finality_depth * block_time / 60 secs = < 1 min (finality time)
NoNewFinalizedHeadsThreshold = '1m'
Copy link
Collaborator

@dhaidashenko dhaidashenko Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we also set NoNewHeadsThreshold to a lower value (current 3m)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. added!


[GasEstimator]
EIP1559DynamicFees = false
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[NodePool]
NewHeadsPollInterval = '4s'
6 changes: 5 additions & 1 deletion core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,18 @@ var sei = ClientErrors{
Fatal: regexp.MustCompile(`(: |^)'*out of gas|insufficient fee|Tx too large. Max size is \d+, but got \d+|: insufficient funds`),
}

var monad = ClientErrors{
TerminallyUnderpriced: regexp.MustCompile("Gas limit too low"),
}

const TerminallyStuckMsg = "transaction terminally stuck"

// Tx.Error messages that are set internally so they are not chain or client specific
var internal = ClientErrors{
TerminallyStuck: regexp.MustCompile(TerminallyStuckMsg),
}

var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, treasure, mantle, aStar, hedera, gnosis, sei, internal}
var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, treasure, mantle, aStar, hedera, gnosis, sei, monad, internal}

// ClientErrorRegexes returns a map of compiled regexes for each error type
func ClientErrorRegexes(errsRegex config.ClientErrors) *ClientErrors {
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func Test_Eth_Errors(t *testing.T) {
{"client error terminally underpriced", true, "tomlConfig"},
{"gas price less than block base fee", true, "aStar"},
{"[Request ID: e4d09e44-19a4-4eb7-babe-270db4c2ebc9] Gas price '830000000000' is below configured minimum gas price '950000000000'", true, "hedera"},
{"Gas limit too low", true, "monad"},
}

for _, test := range tests {
Expand Down
23 changes: 23 additions & 0 deletions core/chains/evm/config/toml/defaults/Monad_Testnet.toml
Copy link
Contributor

@simsonraj simsonraj Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we dont have the DF. we dont need to override all the configs inside core, do we?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we always need to have this override. CCIP's is the option one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea but shouldn't the chainID only be enough & the rest will be picked up from the ccip defaults?

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ChainID = '10143'
# finality_depth was: 0
FinalityDepth = 10
# block_time was: 1s, adding 1 second buffer
LogPollInterval = '2s'
# No WS Support
LogBroadcasterEnabled = false
FinalityTagEnabled = false
# finality_depth * block_time / 60 secs = < 1 min (finality time)
NoNewFinalizedHeadsThreshold = '1m'

[GasEstimator]
EIP1559DynamicFees = false
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[NodePool]
NewHeadsPollInterval = '4s'
107 changes: 107 additions & 0 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7490,6 +7490,113 @@ GasLimitDefault = 400000

</p></details>

<details><summary>Monad Testnet (10143)</summary><p>

```toml
AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 10
FinalityTagEnabled = false
LogBackfillBatchSize = 1000
LogPollInterval = '2s'
LogKeepBlocksDepth = 100000
LogPrunePageSize = 0
BackupLogPollerBlockDelay = 100
MinIncomingConfirmations = 3
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '3m0s'
LogBroadcasterEnabled = false
RPCDefaultBatchSize = 250
RPCBlockQueryDelay = 1
FinalizedBlockOffset = 0
NoNewFinalizedHeadsThreshold = '1m0s'

[Transactions]
Enabled = true
ForwardersEnabled = false
MaxInFlight = 16
MaxQueued = 250
ReaperInterval = '1h0m0s'
ReaperThreshold = '168h0m0s'
ResendAfterThreshold = '1m0s'

[Transactions.AutoPurge]
Enabled = false

[Transactions.TransactionManagerV2]
Enabled = false

[BalanceMonitor]
Enabled = true

[GasEstimator]
Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '1 gwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
LimitTransfer = 21000
EstimateLimit = false
BumpMin = '5 gwei'
BumpPercent = 20
BumpThreshold = 3
EIP1559DynamicFees = false
FeeCapDefault = '100 gwei'
TipCapDefault = '1 wei'
TipCapMin = '1 wei'

[GasEstimator.BlockHistory]
BatchSize = 25
BlockHistorySize = 100
CheckInclusionBlocks = 12
CheckInclusionPercentile = 90
TransactionPercentile = 60

[GasEstimator.FeeHistory]
CacheTimeout = '2s'

[HeadTracker]
HistoryDepth = 100
MaxBufferSize = 3
SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = true
PersistenceEnabled = true

[NodePool]
PollFailureThreshold = 5
PollInterval = '10s'
SelectionMode = 'HighestHead'
SyncThreshold = 5
LeaseDuration = '0s'
NodeIsSyncingEnabled = false
FinalizedBlockPollInterval = '5s'
EnforceRepeatableRead = true
DeathDeclarationDelay = '1m0s'
NewHeadsPollInterval = '4s'

[OCR]
ContractConfirmations = 4
ContractTransmitterTransmitTimeout = '10s'
DatabaseTimeout = '10s'
DeltaCOverride = '168h0m0s'
DeltaCJitterOverride = '1h0m0s'
ObservationGracePeriod = '1s'

[OCR2]
[OCR2.Automation]
GasLimit = 5400000

[Workflow]
GasLimitDefault = 400000
```

</p></details>

<details><summary>Gnosis Chiado (10200)</summary><p>

```toml
Expand Down
Loading