From d36df5519c9f41822b5229e52020f282e91c7a5a Mon Sep 17 00:00:00 2001 From: bnoieh <135800952+bnoieh@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:13:22 +0800 Subject: [PATCH 1/2] op-node: change verifiedValidatorNum to 8 temporarily --- op-service/sources/eth_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/op-service/sources/eth_client.go b/op-service/sources/eth_client.go index 5ffa3f07e..b40a2a628 100644 --- a/op-service/sources/eth_client.go +++ b/op-service/sources/eth_client.go @@ -285,7 +285,9 @@ func (s *EthClient) InfoByLabel(ctx context.Context, label eth.BlockLabel) (eth. func (s *EthClient) BSCInfoByLabel(ctx context.Context, label eth.BlockLabel) (eth.BlockInfo, error) { // can't hit the cache when querying the head due to reorgs / changes. if label == eth.Finalized { - return s.bscFinalizedHeader(ctx, 21) + // FIXME set verifiedValidatorNum to -3 before release, set it to 8 temporarily for hotfix + // refs: https://github.com/bnb-chain/bsc/pull/2844 + return s.bscFinalizedHeader(ctx, 8) } return s.headerCall(ctx, "eth_getBlockByNumber", label) } From 69e8c4faa4d3dd8d3498a3f2c79e4c4ca70bb162 Mon Sep 17 00:00:00 2001 From: bnoieh <135800952+bnoieh@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:44:21 +0800 Subject: [PATCH 2/2] op-node: change verifiedValidatorNum param of getFinalizedHeader API to -3 --- op-service/sources/eth_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op-service/sources/eth_client.go b/op-service/sources/eth_client.go index b40a2a628..e6879047f 100644 --- a/op-service/sources/eth_client.go +++ b/op-service/sources/eth_client.go @@ -285,9 +285,9 @@ func (s *EthClient) InfoByLabel(ctx context.Context, label eth.BlockLabel) (eth. func (s *EthClient) BSCInfoByLabel(ctx context.Context, label eth.BlockLabel) (eth.BlockInfo, error) { // can't hit the cache when querying the head due to reorgs / changes. if label == eth.Finalized { - // FIXME set verifiedValidatorNum to -3 before release, set it to 8 temporarily for hotfix + // -3 means automatically use the len(validators) of BSC network // refs: https://github.com/bnb-chain/bsc/pull/2844 - return s.bscFinalizedHeader(ctx, 8) + return s.bscFinalizedHeader(ctx, -3) } return s.headerCall(ctx, "eth_getBlockByNumber", label) }