-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CCIP-4223 bubble up revert for estimation #15504
base: develop
Are you sure you want to change the base?
Conversation
Static analysis results are availableHey @0xsuryansh, you can view Slither reports in the job summary here or download them as artifact here. |
Solidity Review Jira issueHey! We have taken the liberty to link this PR to a Jira issue for Solidity Review. This is a new feature, that's currently in the pilot phase, so please make sure that the linkage is correct. In a contrary case, please update it manually in JIRA and replace Solidity Review issue key in the changeset file with the correct one. Any changes to the Solidity Review Jira issue should be reflected in the changeset file. If you need to update the issue key, please do so manually in the following changeset file: This PR has been linked to Solidity Review Jira issue: CCIP-3966 |
AER Report: CI Coreaer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , GolangCI Lint (.) , Core Tests (go_core_race_tests) , test-scripts , lint , SonarQube Scan 1. Remote end closed connection without response:[go_core_tests]Source of Error:
Why: The error occurred because the remote server closed the connection without sending a response. This could be due to network issues, server overload, or the server being down. Suggested fix: Implement retry logic for network requests to handle transient network issues. Additionally, ensure the server is stable and capable of handling the load. 2. Encountered test failures:[go_core_tests]Source of Error:
Why: The test suite encountered failures, which caused the process to exit with a non-zero status code. This indicates that some tests did not pass successfully. Suggested fix: Review the test logs to identify the specific tests that failed and address the underlying issues. Ensure all dependencies and configurations are correct before rerunning the tests. AER Report: Operator UI CI ran successfully ✅ |
# Conflicts: # contracts/gas-snapshots/ccip.gas-snapshot # core/gethwrappers/ccip/generated/multi_ocr3_helper/multi_ocr3_helper.go # core/gethwrappers/ccip/generated/offramp/offramp.go # core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt
Flakeguard Summary
Found Flaky Tests ❌
|
9b8c6c9
to
5686b69
Compare
contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.trialExecute.t.sol
Outdated
Show resolved
Hide resolved
# Conflicts: # contracts/gas-snapshots/ccip.gas-snapshot # core/gethwrappers/ccip/generated/multi_ocr3_helper/multi_ocr3_helper.go # core/gethwrappers/ccip/generated/offramp/offramp.go # core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt
# Conflicts: # core/gethwrappers/ccip/generated/multi_ocr3_helper/multi_ocr3_helper.go # core/gethwrappers/ccip/generated/offramp/offramp.go # core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt
@@ -3,12 +3,17 @@ pragma solidity ^0.8.24; | |||
|
|||
import {Internal} from "../../../libraries/Internal.sol"; | |||
import {RateLimiter} from "../../../libraries/RateLimiter.sol"; | |||
import {MultiOCR3Base} from "../../../ocr/MultiOCR3Base.sol"; | |||
import {OffRamp} from "../../../offRamp/OffRamp.sol"; | |||
import {OffRampSetup} from "./OffRampSetup.t.sol"; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rm newline
import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; | ||
|
||
contract OffRamp_trialExecute is OffRampSetup { | ||
address private constant GAS_ESTIMATION_SENDER = address(0xC11C11C11C11C11C11C11C11C11C11C11C11C1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure we can import this value and not have to redefine it. Probably means moving it to the internal lib? Would be nice if the offchain code can also use a reference and not a duplicated value
|
||
vm.mockCallRevert( | ||
address(s_offRamp), | ||
abi.encodeWithSelector(s_offRamp.executeSingleMessage.selector, message, offchainTokenData, tokenGasOverrides), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: prefer encodeCall
@@ -117,4 +122,68 @@ contract OffRamp_trialExecute is OffRampSetup { | |||
assertEq(uint256(Internal.MessageExecutionState.FAILURE), uint256(newState)); | |||
assertEq(abi.encodeWithSelector(OffRamp.NotACompatiblePool.selector, address(0)), err); | |||
} | |||
|
|||
function test_trialExecute_CallWithExactGasRevertsAndSenderIsNotGasEstimator() public { | |||
uint256[] memory amounts = new uint256[](2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test setup can be more minimal, tokens have no impact here
); | ||
|
||
vm.expectRevert(MultiOCR3Base.InsufficientGasForCallWithExact.selector); | ||
changePrank(GAS_ESTIMATION_SENDER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no code should be between the expectRevert and the call, you can more the prank up
Quality Gate passedIssues Measures |
PR adds logic to bubble up the revert when gas estimation address Is address(1)