Skip to content

Commit

Permalink
Linea soak (#10641)
Browse files Browse the repository at this point in the history
* Linea soak

* Empty

* Update config

* Update config

* Update config

* Update config

* Add Linea mainnet config

* Fine tune config

* go patch

* Add sub tables to toml

* go mod tidy

* Reverts toml change

* Generates config docs

* Adjust Linea config

* Fallback to default BlockHistorySize

* Update docs

* Adjust testnet config
  • Loading branch information
davidcauchi authored Oct 20, 2023
1 parent e952560 commit bdec2c1
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/on-demand-ocr-soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- "SCROLL_MAINNET"
- "MUMBAI"
- "POLYGON_MAINNET"
- "LINEA_GOERLI"
- "LINEA_MAINNET"
fundingPrivateKey:
description: Private funding key (Skip for Simulated)
required: false
Expand Down
12 changes: 12 additions & 0 deletions core/chains/evm/config/toml/defaults/Linea_Goerli.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ChainID = '59140'
# Block time 12s, finality < 3m
FinalityDepth = 15
# Blocks are only emitted when a transaction happens / no empty blocks
NoNewHeadsThreshold = '0'

[GasEstimator]
BumpPercent = 40

[Transactions]
# increase resend time to align with finality
ResendAfterThreshold = '3m'
17 changes: 17 additions & 0 deletions core/chains/evm/config/toml/defaults/Linea_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ChainID = '59144'
# Block time 12s, finality < 60m
FinalityDepth = 300
# Blocks are only emitted when a transaction happens / no empty blocks
NoNewHeadsThreshold = '0'

[GasEstimator]
BumpPercent = 40
PriceMin = '400 mwei'

[Transactions]
# increase resend time to align with finality
ResendAfterThreshold = '3m'

# set greater than finality depth
[HeadTracker]
HistoryDepth = 350
156 changes: 156 additions & 0 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3751,6 +3751,162 @@ GasLimit = 5300000

</p></details>

<details><summary>Linea Goerli (59140)</summary><p>

```toml
AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 15
FinalityTagEnabled = false
LogBackfillBatchSize = 1000
LogPollInterval = '15s'
LogKeepBlocksDepth = 100000
MinIncomingConfirmations = 3
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '0s'
RPCDefaultBatchSize = 250
RPCBlockQueryDelay = 1

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

[BalanceMonitor]
Enabled = true

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

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

[HeadTracker]
HistoryDepth = 100
MaxBufferSize = 3
SamplingInterval = '1s'

[NodePool]
PollFailureThreshold = 5
PollInterval = '10s'
SelectionMode = 'HighestHead'
SyncThreshold = 5
LeaseDuration = '0s'

[OCR]
ContractConfirmations = 4
ContractTransmitterTransmitTimeout = '10s'
DatabaseTimeout = '10s'
ObservationGracePeriod = '1s'

[OCR2]
[OCR2.Automation]
GasLimit = 5300000
```

</p></details>

<details><summary>Linea Mainnet (59144)</summary><p>

```toml
AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 300
FinalityTagEnabled = false
LogBackfillBatchSize = 1000
LogPollInterval = '15s'
LogKeepBlocksDepth = 100000
MinIncomingConfirmations = 3
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '0s'
RPCDefaultBatchSize = 250
RPCBlockQueryDelay = 1

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

[BalanceMonitor]
Enabled = true

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

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

[HeadTracker]
HistoryDepth = 350
MaxBufferSize = 3
SamplingInterval = '1s'

[NodePool]
PollFailureThreshold = 5
PollInterval = '10s'
SelectionMode = 'HighestHead'
SyncThreshold = 5
LeaseDuration = '0s'

[OCR]
ContractConfirmations = 4
ContractTransmitterTransmitTimeout = '10s'
DatabaseTimeout = '10s'
ObservationGracePeriod = '1s'

[OCR2]
[OCR2.Automation]
GasLimit = 5300000
```

</p></details>

<details><summary>Polygon Mumbai (80001)</summary><p>

```toml
Expand Down
6 changes: 6 additions & 0 deletions integration-tests/contracts/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ func NewContractDeployer(bcClient blockchain.EVMClient, logger zerolog.Logger) (
return &ScrollContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil
case *blockchain.PolygonZkEvmClient:
return &PolygonZkEvmContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil
case *blockchain.LineaClient:
return &LineaContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil
}
return nil, errors.New("unknown blockchain client implementation for contract deployer, register blockchain client in NewContractDeployer")
}
Expand Down Expand Up @@ -218,6 +220,10 @@ type PolygonZkEvmContractDeployer struct {
*EthereumContractDeployer
}

type LineaContractDeployer struct {
*EthereumContractDeployer
}

// NewEthereumContractDeployer returns an instantiated instance of the ETH contract deployer
func NewEthereumContractDeployer(ethClient blockchain.EVMClient, logger zerolog.Logger) *EthereumContractDeployer {
return &EthereumContractDeployer{
Expand Down

0 comments on commit bdec2c1

Please sign in to comment.