Skip to content

Commit

Permalink
fix: blocked gateway cctx for high-gas deposit (#3106)
Browse files Browse the repository at this point in the history
* test high gas consumption

* increase gas use

* increase gas use

* add gas limit

* create test for out of gas

* generate and lint

* set gas limit

* changelog and add test back

* handle error

* Update e2e/e2etests/test_deposit_and_call_out_of_gas.go

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>

* fix

---------

Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>
  • Loading branch information
lumtis and swift1337 authored Nov 8, 2024
1 parent 0e86494 commit b5985bc
Show file tree
Hide file tree
Showing 11 changed files with 435 additions and 8 deletions.
4 changes: 1 addition & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
### Refactor
* [3118](https://github.com/zeta-chain/node/pull/3118) - zetaclient: remove hsm signer

### Tests

### Fixes
* [3041](https://github.com/zeta-chain/node/pull/3041) - replace libp2p public DHT with private gossip peer discovery and connection gater for inbound connections

* [3106](https://github.com/zeta-chain/node/pull/3106) - prevent blocked CCTX on out of gas during omnichain calls

## v21.0.0

Expand Down
1 change: 1 addition & 0 deletions cmd/zetae2e/local/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func startV2Tests(eg *errgroup.Group, conf config.Config, deployerRunner *runner
e2etests.TestV2ETHDepositAndCallRevertWithCallName,
e2etests.TestV2ETHWithdrawAndCallRevertName,
e2etests.TestV2ETHWithdrawAndCallRevertWithCallName,
e2etests.TestDepositAndCallOutOfGasName,
),
)

Expand Down
47 changes: 47 additions & 0 deletions e2e/contracts/testgasconsumer/TestGasConsumer.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"inputs": [
{
"components": [
{
"internalType": "bytes",
"name": "origin",
"type": "bytes"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "chainID",
"type": "uint256"
}
],
"internalType": "struct TestGasConsumer.zContext",
"name": "_context",
"type": "tuple"
},
{
"internalType": "address",
"name": "_zrc20",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_message",
"type": "bytes"
}
],
"name": "onCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
1 change: 1 addition & 0 deletions e2e/contracts/testgasconsumer/TestGasConsumer.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6080604052348015600f57600080fd5b5061036d8061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80635bcfd61614610030575b600080fd5b61004a60048036038101906100459190610233565b61004c565b005b61005461005b565b5050505050565b6000624c4b4090506000614e209050600081836100789190610306565b905060005b818110156100bb576000819080600181540180825580915050600190039060005260206000200160009091909190915055808060010191505061007d565b506000806100c991906100ce565b505050565b50805460008255906000526020600020908101906100ec91906100ef565b50565b5b808211156101085760008160009055506001016100f0565b5090565b600080fd5b600080fd5b600080fd5b60006060828403121561013157610130610116565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101658261013a565b9050919050565b6101758161015a565b811461018057600080fd5b50565b6000813590506101928161016c565b92915050565b6000819050919050565b6101ab81610198565b81146101b657600080fd5b50565b6000813590506101c8816101a2565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126101f3576101f26101ce565b5b8235905067ffffffffffffffff8111156102105761020f6101d3565b5b60208301915083600182028301111561022c5761022b6101d8565b5b9250929050565b60008060008060006080868803121561024f5761024e61010c565b5b600086013567ffffffffffffffff81111561026d5761026c610111565b5b6102798882890161011b565b955050602061028a88828901610183565b945050604061029b888289016101b9565b935050606086013567ffffffffffffffff8111156102bc576102bb610111565b5b6102c8888289016101dd565b92509250509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061031182610198565b915061031c83610198565b92508261032c5761032b6102d7565b5b82820490509291505056fea2646970667358221220e1d03a34090a8a647a128849d9f9434831ba3b1e4d28a514d9c9dc922068351e64736f6c634300081a0033
231 changes: 231 additions & 0 deletions e2e/contracts/testgasconsumer/TestGasConsumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b5985bc

Please sign in to comment.