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

Feature/optional ws url #1534

Closed
wants to merge 49 commits into from
Closed

Conversation

simsonraj
Copy link
Collaborator

@simsonraj simsonraj commented Nov 13, 2024

AnieeG and others added 30 commits August 26, 2024 19:36
…ich have no TypeAndVersion(#1368) (#1369)

## Motivation

- 1.0.0 contracts have no TypeAndVersion however tooling validation
expects a TypeAndVersion be set

## Solution

- Return `Unknown 1.0.0` for contracts with an empty type and version
string, implying that they are 1.0.0 deployed contracts

## Motivation


## Solution

Co-authored-by: Peter Olds <me@polds.dev>
Cherry-pick of smartcontractkit/chainlink#14236

---------

Co-authored-by: Dmytro Haidashenko <34754799+dhaidashenko@users.noreply.github.com>
* Added gas limit estimation feature to EVM gas estimators

* Added changeset

* Fixed linting

* Added new failure tests

* Fixed test

* Fixed mock configs in ccip capabilities

* Fixed configs

* Fixed test

* Refactored GetFee method

* Added EstimatedGasBuffer and addressed feedback

* Fixed linting

* Fixed config doc and tests

* Addressed feedback

* Fixed typo

* Repurposed LimitMultiplier to be used as a buffer for estimated gas

* Updated mocks

* Removed LimitMultiplier if gas estimation fails and updated config docs

* Fixed Broadcaster test

* Enabled uncapped gas limit estimation if provided fee limit is 0

* Updated estimate gas buffer to be a fixed value instead of using LimitMultiplier

* Updated log message

* Updated logs

---------

Co-authored-by: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com>
* Set from address for gas limit estimation

* Updated tests

* Added changeset
* Updated EstimateGasLimit config name to EstimateLimit

* Updated mocks

* Fixed linting

* Updated changeset
* Add Mantle errors

* Add tests for Mantle errors

* changeset

* Update seven-kiwis-run.md
* edited op stack oracle to include tokenRatio for Mantle

* typo fix

* fixed syntax errors

* fixed compilation errors in test

* added unit tests for Mantle oracle changes

* typo fix

* added changeset file

* added hashtag to changeset

* changed unit test to include new chaintype

* changed test to include new chaintype

* typo fix

* addressed alphabetical order and error issues

* used batch call instead of separate calls for L1 Base Fee

* added test cases for RPC errors to Mantle
* make Mantle use vanilla OP gas price oracle

* changeset

* bring back l1 oracle

* update mock

* [BCI-4072] changeset update

---------

Co-authored-by: valerii.kabisov <valerii.kabisov@smartcontract.com>
Co-authored-by: Valerii Kabisov <172247313+valerii-kabisov-cll@users.noreply.github.com>
* Introduce universal estimator

* Fixes

* Use WeiMin to cap bump price

* Update connectivity logic

* Fix error

* Fixes

* Cover an edge case when enforcing limits

* Add changeset

* Update mempool check logic

* Update config names

* Convert Universal Estimator to service

* Client changes to support UE

* Introduce configs

* Update mocks

* Fix lint

* Fix test cases

* Fix mockery

* Fix test cases

* Update comment

* Fix Start/Close sync issue

* Address feedback

* Fix lint

* Fix lint

* More changes

* Add more comments

* Fix merge conflicts

* Update CONFIG

* Rename to FeeHistory estimator

* Rename

* Exclude zero priced priority fees

* Remove HasMempool

* Remove testing commit

* Fixes

* Add DefaultJitter

* Add optimizations

* Fix testscripts

* Fix name

* Update error messages
* Add node level OOC error

* Add changeset
* Change Polygon zkEVM to use SuggestedPriceEstimator

(SHIP-2885)

* Set PriceMin to 1mwei for Polygon zkEVM

* Remove Polygon zkEVM Goerli

* Enable FeeHistory estimator for Polygon zkEVM

* Update PriceMin

* apply suggestions

* Set CacheTimeout to 2 seconds

* Revert back to 5s cachetimeout

* Change timeout to 4 seconds

---------

Co-authored-by: joaoluisam <joao.luismoreira@smartcontract.com>
* Add Zircuit Configs

* Add Changeset

* Update changeset
## Motivation
Set ChainType='astar' to use custom finality on mainnet

## Solution

---------

Co-authored-by: simsonraj <simsonraj.easvarasakthi@smartcontract.com>
Specifically, allow for empty message with zero gas.

## Motivation
EVM2EVMOffRamp checks the message for content and gaslimit and skips
calling ccip receive if they're not present.
Consequently the mock errors (ReceiverError) when sending only tokens to
a smart contract. This update will help chainlink-local correctly
process fork-based tests too.

## Solution
The MockRouter implementation of _routeMessage was last updated in
#669 and is out of sync
with the logic in EVM2EVMOffRamp.
…1161)

## Motivation
We use DAGasPriceEstimator to roughly estimate execution cost of a
message in the Exec plugin.

During this execution cost estimation, we need to account for the data
availability component:


```
type DAGasPriceEstimator struct {
    daOverheadGas       int64
    gasPerDAByte        int64  
    daMultiplier        int64
}
```
however, these fields are not used atm, they remain 0 during cost
estimation. The challenge is they live in OnRamp.sol DynamicConfig,


```
struct DynamicConfig {
    uint32 destDataAvailabilityOverheadGas; //    Extra data availability gas charged on top of the message, e.g. for OCR
    uint16 destGasPerDataAvailabilityByte; //     Amount of gas to charge per byte of message data that needs availability
    uint16 destDataAvailabilityMultiplierBps; //  Multiplier for data availability gas, multiples of bps, or 0.0001
}
 ```

We need to read them via the OnRamp reader and pass that into the DAGasPriceEstimator one way or another.
## Solution

New service implemented to transfer onRamp config to offRamp/commit plugins. It provides weak dependency between plugins and provides actual data on demand.
#1446)

[https://smartcontract-it.atlassian.net/browse/CCIP-3376](https://smartcontract-it.atlassian.net/browse/CCIP-3376)

The CCIP gas limit is set by customers. This cannot be changed because
this limit is directly used within the contracts (which expect limits in
terms of ETH). Also, the L2 gas price returned from our current
estimators for Mantle is in MNT. Therefore, the final formula needed for
CCIP to calculate L2 transaction fees is the following:
gasLimit_EVM * (gasPrice_Mantle * TokenRatio)
Therefore, we need to multiply the gas price returned from our gas
estimators by tokenRatio for CCIP. This should happen in the CCIP price
estimator. Currently, we have no component here for chain-specific
logic, so we will need to add this functionality.

---------

Co-authored-by: Matt Yang <matt.yang@smartcontract.com>
## Motivation


## Solution
## Motivation


## Solution
## Motivation
For the exec provider, in some cases, the onRamp reader is not
initialized. For immediate reaction, we need to allow execution without
blocking in cases if onRamp is not initialized. It fails due the issue
when onRampReader is not initialized for execProvider. This fix should
fix this issue. In case the onRamp reader is not initialized, the module
will return 0 values and DAGasEstimator will behave as it worked before
this feature been implemented.
Bumps chain-selectors version to latest.
cherry picked from #1492
## Motivation


## Solution

---------

Co-authored-by: Mohamed Mehany <7327188+mohamed-mehany@users.noreply.github.com>
(cherry picked from commit 4377d9a)

## Motivation


## Solution
An NPE bug was identified in the Stuck Tx Detector component. The fix
was addressed in this
smartcontractkit/chainlink#14685 in core but
needs to be applied to CCIP as well. Changes could not be cherry-picked
because of other changes made to the component in between so changes
were back ported manually.
https://github.com/smartcontractkit/chainlink/pull/14859/files#diff-e9a4f21557894a9a2c77ca090bea14ed69bdfea02500c0cfd04628a1941f6e6c

* handle mantle "nonce too low" error

* add changeset

## Motivation


## Solution

Co-authored-by: Matthew Romage <33700623+ma33r@users.noreply.github.com>
dhaidashenko and others added 14 commits November 9, 2024 13:16
…ion in rpc client (#14534)

* polling subscription to be registered

* adding changeset

* fix Subscribe new head

* add test

* update changeset

* fix lint

* fix deadlock and add unit test for http polling sub

* update changeset

* adding sub closed check and remove import

* add unit test coverage for http polling subscribeToHeads

* update test

* address comments part 1

* clean

* part 2

* fix lint

* fix lint

(cherry picked from commit de268e98b8d68a284e1260297925b91c5d2411bc)
* WS URL can be optional

* add changeset

* change

* make WSURL optional

* fix test, and enforce SubscribeFilterLogs to fail when ws url not provided

* add comments

* update changeset

* update dial logic and make ws optional not required

* fix test

* fix

* fix lint

* address comments

* update comments

* fix test

* add check when both ws and http missing

* add test and add restrictions

* add comment

* revert outdated change

* remove extra line

* fix test

* revert changes from rpc client

* unintended change

* remove unused

* update verification logic

* add test fix

* modify unit test to cover logbroadcaster enabled false

* update doc

* udpate changeset

* address PR comments

* address pr comments

* update invalid toml config

* fix test

* ws required for primary nodes when logbroadcaster enabled

* minor

* Dmytro's comments

* fix nil ptr, more fix to come

* fix make

* refactor function sig

* fix test

* fix

* make ws pointer

* fix

* fix make

* address comments

* fix lint

* fix make

* fix make

* fix make

* fix rpc disconnect with optional ws url

---------

Co-authored-by: Dmytro Haidashenko <dmytro.haidashenko@smartcontract.com>
(cherry picked from commit 5d96be59a27f68f2f491a7d9f8cb0b2af4e0e835)
* add test

* add more test

* add changeset

(cherry picked from commit da5910eda98882f8a1b9ccc52b99afa223fb3997)
This reverts commit 7c91b65.
…(linter issues were not caused by the PR changes)"

This reverts commit 9093754.
@simsonraj simsonraj closed this Nov 13, 2024
@matYang matYang deleted the feature/optional-ws-url branch November 14, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.