-
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
Allow retrying failed transmissions #14017
Conversation
LCOV of commit
|
8f08869
to
a502356
Compare
686e080
to
c19c0fb
Compare
assembly { | ||
// call and return whether we succeeded. ignore return data | ||
// call(gas,addr,value,argsOffset,argsLength,retOffset,retLength) | ||
success := call(gasLimit, receiver, 0, add(payload, 0x20), mload(payload), 0x0, 0x0) |
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.
That success == false mean any reason for revert or only out of gas?
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.
It can be either a revert (for whatever user reason) or out of gas (technically, still a revert).
/// @dev The gas we require to revert in case of a revert in the call to the | ||
/// receiver. This is more than enough and does not attempt to be exact. | ||
uint256 internal constant REQUIRED_GAS_FOR_ROUTING = 40_000; | ||
bytes4 internal constant INSUFFICIENT_GAS_FOR_ROUTING_SIG = 0x0bfecd63; |
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.
Do we want to add a NatSpec comment for this?
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.
Removed it as it is unused 🙈
// ================================================================ | ||
// │ Router │ | ||
// ================================================================ | ||
|
||
mapping(address forwarder => bool) internal s_forwarders; | ||
mapping(bytes32 transmissionId => TransmissionInfo) internal s_transmissions; | ||
mapping(bytes32 transmissionId => Transmission) internal s_transmissions; |
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.
mapping(bytes32 transmissionId => Transmission) internal s_transmissions; | |
mapping(bytes32 transmissionId => Transmission transmission) internal s_transmissions; |
success := call(gasLimit, receiver, 0, add(payload, 0x20), mload(payload), 0x0, 0x0) | ||
} | ||
|
||
if (success) { |
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.
Is this check just to prevent the storage write?
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.
Yes.
Quality Gate passedIssues Measures |
* develop: CRIB CI integration (#13924) fix: refactor sonarqube scan args (#13875) BCI-3492 [LogPoller]: Allow withObservedExecAndRowsAffected to report non-zero rows affected (#14057) Add error mapping for Astar (#13990) [BCI-3862][chainlink] - Change DSL Block primitive to string instead of int (#14033) [KS-412] Validate called DON membership in TriggerPublisher (#14040) [TT-1429] notifying guardian on some failures (#14073) Add Mantle errors (#14053) Fix write target nil dereferences (#14059) Allow retrying failed transmissions (#14017) auto-11214: migrate more tests to foundry (#13934)
On-chain:
Off-chain: