-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Description
Implement a gas price feedback mechanism for transactions cancelled due to shared object congestion.
Note
This task only concerns about introducing such a feedback mechanism in the protocol, i.e., including some estimated or suggested gas price in the cancelled transaction's error message. As a suggested/estimated gas price, we will simply use the lowest gas price of a non-deferred transaction in the same consensus commit round. More sofisticated gas price estimations and recommendations for cancelled transactions are considered for future work, and thus, they should be addressed in separate issues.
Motivation
Currently, when a transaction is cancelled due to shared object congestion, the corresponding execution failure message only contains information about congested shared objects:
iota/crates/iota-types/src/execution_status.rs
Lines 197 to 198 in 2720ebd
| #[error("Certificate is cancelled due to congestion on shared objects: {congested_objects}")] | |
| ExecutionCancelledDueToSharedObjectCongestion { congested_objects: CongestedObjects }, |
Recall that shared-object transactions with higher gas prices have higher priority in being scheduled for execution first. Thus, it would be quite convenient for the sender of a cancelled transaction to receive gas price feedback. This feedback can include a suggested or estimated gas price such that if the transaction is re-sent with this adjusted gas price, it will have higher chances of not being cancelled. However, the ExecutionCancelledDueToSharedObjectCongestion error message in its current form does not include any such information.
Are you planning to do it yourself in a pull request?
Yes.