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

feat(zetaclient): disable EIP-1559 #3222

Open
wants to merge 1 commit into
base: release/v23
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
7 changes: 6 additions & 1 deletion zetaclient/chains/evm/observer/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ func NewObserver(
evmJSONRPC: evmJSONRPC,
outboundConfirmedReceipts: make(map[string]*ethtypes.Receipt),
outboundConfirmedTransactions: make(map[string]*ethtypes.Transaction),
priorityFeeConfig: priorityFeeConfig{},
priorityFeeConfig: priorityFeeConfig{
Copy link
Member

Choose a reason for hiding this comment

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

Just to confirm, to prevent:

  • 1 voting new priorityFee?
  • 2 Using EIP1559 for the transactions?

If we have 1 but not 2, isn't some possible issue of using eip1559 while priorityFee is not updated?

Copy link
Contributor Author

@swift1337 swift1337 Nov 27, 2024

Choose a reason for hiding this comment

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

checked bool means we've already determined whether this chain supports priority fee. from the second time and on it will directly use supported bool

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the same in a comment where the priorityFeeConfig is defined.

// temporary disable EIP-1559
// https://github.com/zeta-chain/node/issues/3221
supported: false,
checked: true,
},
}

// load last block scanned
Expand Down
6 changes: 4 additions & 2 deletions zetaclient/chains/evm/observer/observer_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ func TestPostGasPrice(t *testing.T) {
observer, _ := MockEVMObserver(t, chain, ethRPC, nil, zetacoreClient, nil, blockNumber, chainParam)

// Given empty baseFee from RPC
ethRPC.On("HeaderByNumber", anything, anything).Return(&ethtypes.Header{BaseFee: nil}, nil)
ethRPC.On("HeaderByNumber", anything, anything).Return(&ethtypes.Header{BaseFee: nil}, nil).Maybe()

// Given gasPrice and priorityFee from RPC
ethRPC.On("SuggestGasPrice", anything).Return(big.NewInt(3*gwei), nil)
ethRPC.On("SuggestGasTipCap", anything).Return(big.NewInt(0), nil)
ethRPC.On("SuggestGasTipCap", anything).Return(big.NewInt(0), nil).Maybe()

// Given mock collector for zetacore call
// PostVoteGasPrice(ctx, chain, gasPrice, priorityFee, blockNum)
Expand All @@ -69,6 +69,8 @@ func TestPostGasPrice(t *testing.T) {
})

t.Run("Post EIP-1559 supports priorityFee", func(t *testing.T) {
t.Skipf("Skipped due to https://github.com/zeta-chain/node/issues/3221")

// ARRANGE
// Given ETH rpc mock
ethRPC := mocks.NewEVMRPCClient(t)
Expand Down
Loading