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

WS URL can be optional when LogBroadcaster is disabled #14364

Merged
merged 55 commits into from
Oct 3, 2024

Conversation

huangzhen1997
Copy link
Contributor

@huangzhen1997 huangzhen1997 commented Sep 6, 2024

Description

WS URL can be optional (empty string) when LogBroadcaster is disabled. If WS URL was not provided, SubscribeFilterLogs should fail with an explicit error

Tickets:

BCFR-451

@huangzhen1997 huangzhen1997 marked this pull request as ready for review September 6, 2024 20:46
@huangzhen1997 huangzhen1997 requested review from a team as code owners September 6, 2024 20:46
@huangzhen1997 huangzhen1997 requested review from reductionista and dhaidashenko and removed request for a team September 6, 2024 20:46
core/chains/evm/config/toml/config.go Outdated Show resolved Hide resolved
@@ -20,7 +20,7 @@ func NewEvmClient(cfg evmconfig.NodePool, chainCfg commonclient.ChainConfig, cli
var sendonlys []commonclient.SendOnlyNode[*big.Int, RPCClient]
largePayloadRPCTimeout, defaultRPCTimeout := getRPCTimeouts(chainType)
for i, node := range nodes {
if node.SendOnly != nil && *node.SendOnly {
if node.WSURL == nil || (node.SendOnly != nil && *node.SendOnly) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

A secondary or SendOnly node has limited functionality. It's only used to broadcast transactions (fire and forget), and we are not running health checks for it.
We should not change the type of the node. Instead, introduce changes to the RPC client.

Copy link
Contributor Author

@huangzhen1997 huangzhen1997 Sep 9, 2024

Choose a reason for hiding this comment

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

Moving the enforcement check to Dial() at rpc_client.go

jmank88
jmank88 previously approved these changes Sep 27, 2024
@dimriou dimriou added this pull request to the merge queue Oct 3, 2024
Merged via the queue into develop with commit 5d96be5 Oct 3, 2024
130 checks passed
@dimriou dimriou deleted the BCFR-451/make-ws-url-optional branch October 3, 2024 15:14
matYang pushed a commit to smartcontractkit/ccip that referenced this pull request Nov 14, 2024
Optional WS URL for RPCs to unblock new chain integration.
Charry-picks from:
smartcontractkit/chainlink#14354
smartcontractkit/chainlink#14373
smartcontractkit/chainlink#14534
smartcontractkit/chainlink#14364
smartcontractkit/chainlink#14929

---------

Co-authored-by: Joe Huang <joe.huang@smartcontract.com>
matYang added a commit to smartcontractkit/ccip that referenced this pull request Nov 18, 2024
Optional WS URL for RPCs to unblock new chain integration.
Charry-picks from:
smartcontractkit/chainlink#14534
smartcontractkit/chainlink#14364
smartcontractkit/chainlink#14929

---------

Co-authored-by: Joe Huang <joe.huang@smartcontract.com>
Co-authored-by: Adam Hamrick <adam.hamrick@smartcontract.com>
Co-authored-by: Chunkai Yang <matYang@users.noreply.github.com>
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.

5 participants