Herein errors raised in both RanDAO and Flashbots implementations are listed. Modifiers are presented with superior clarity on the corresponding page.
Common errors
These errors are shared in principle by RanDAO and Flashbots implementations since they inherit from the same contract (from Flashbots realisation, in fact).
OnlyOwner
//raised when an unauthorised user attempts to invoke Agent owner-only functionserrorOnlyOwner();
Scope (modifiers that raise this error):
_assertOnlyOwner
NonEOASender
//raised when a non-EoA account attempts to invoke execute_44g58pverrorNonEOASender();
Scope (modifiers that raise this error):
_msg_sender_is_EoA_assertion
InsufficientKeeperStake
//raised when the keeper does not possess sufficient stake to cover the globally (Agent-level) demanded minimal amount errorInsufficientKeeperStake();
Scope (modifiers that raise this error):
_executing_keeper_stake_sufficient_assertion
InsufficientJobScopedKeeperStake
//raised when the keeper does not possess sufficient stake to cover the Job-specific demanded minimal amount, if anyerrorInsufficientJobScopedKeeperStake();
Scope (modifiers that raise this error):
_keeper_satisfies_job_stake_demand_assertion
KeeperWorkerNotAuthorized
//raised when the message sender invoking execute_44g58pv is not the authorised worker for the keeper passed in calldata. Can be used to enforce compliance with keeper selection made by some algorithm. errorKeeperWorkerNotAuthorized();
Scope (modifiers that raise this error):
_sender_is_authorised_as_keeper_assertion
InsufficientJobCredits
//raised when the job credits are not sufficient to disburse the required payment amounterrorInsufficientJobCredits(uint256 actual,uint256 wanted);
Scope (modifiers that raise this error):
_job_has_enough_credits_assertion
InsufficientJobOwnerCredits
//raised when the job owner credits are not sufficient to disburse the required payment amount, provided the payment is disbursed from his reserveserrorInsufficientJobOwnerCredits(uint256 actual,uint256 wanted);
Scope (modifiers that raise this error):
_job_owner_has_enough_credits_assertion
InactiveJob
//raised when an attempt is made to execute an inactive joberrorInactiveJob(bytes32 jobKey);
Scope (modifiers that raise this error):
_job_is_active_assertion
JobIdOverflow
//raised when an attempt is made to register a job for an address which also has the maximum available amount of jobs (type(uint24).max) registerederrorJobIdOverflow();
Scope (modifiers that raise this error):
_job_id_no_uint24_overflow_assertion
OnlyJobOwner
//raised when an attempt by an unauthorised account is made to set job parameters, withdraw job credits, or initiate an ownership transfererrorOnlyJobOwner();
Scope (modifiers that raise this error):
_assertOnlyJobOwner
JobWithoutOwner
//raised when a job has no owner, that is, its owner is the zero addresserrorJobWithoutOwner();
Scope (modifiers that raise this error):
_target_job_has_owner_assertion
MissingJobAddress
//raised when an attempt to register a job with a zero address (i.e. without an address) is madeerrorMissingJobAddress();
Scope (modifiers that raise this error):
_job_address_exists_assertion
MissingMaxBaseFeeGwei
//raised when an attempt to set job params where no max block base gas fee admissible for computation of dynamic rewards is extant (i.e. it is zero) is madeerrorMissingMaxBaseFeeGwei();
Scope (modifiers that raise this error):
_assertJobParams
NoFixedNorPremiumPctReward
//raised when an attempt to set job params where both fixed and dynamic rewards for the keeper are set to zero is madeerrorNoFixedNorPremiumPctReward();
Scope (modifiers that raise this error):
_assertJobParams
CreditsDepositOverflow
//raised when an attempt is made to set a job stake either at registration or deposit that would lead to overflow of the uint88 type used to stare this stakeerrorCreditsDepositOverflow();
//raised when an attempt is made to set a keeper stake that is in excess of type(uint88).max; this type is used to store keeper stake dataerrorStakeAmountOverflow();
Scope (modifiers that raise this error):
_stake_amount_does_not_overflow_assertion
CreditsWithdrawalUnderflow
//raised when an attempt is made to withdraw job/job owner credits in excess of what is available for withdrawalerrorCreditsWithdrawalUnderflow();
Scope (modifiers that raise this error):
_sufficient_credits_to_withdraw
MissingDeposit
//raised whenever an attempt is made to deposit a zero amount of credits via payable functions depositJobOwnerCredits and depositJobCreditserrorMissingDeposit();
Scope (modifiers that raise this error):
_assertNonZeroValue
MissingAmount
//raised when an operation involving tokens and non-payable functions (i.e. all token-related operations except for deposits) is performed, but the amount specified therein is zeroerrorMissingAmount();
Scope (modifiers that raise this error):
_assertNonZeroAmount
IntervalNotReached
//raised whenever an an attempt is made to execute an interval job without waiting for the timeout interval to pass since the last execution timestamperrorIntervalNotReached(uint256 lastExecutedAt,uint256 interval,uint256 _now);
Scope (modifiers that raise this error):
_execution_interval_reached_assertion
BaseFeeGtGasPrice
//raised whenever the block base gas fee is in excess of the job-specified maximal value, and the keeper has not passed the flag FLAG_ACCEPT_MAX_BASE_FEE_LIMIT, indicating his readiness to accept subpar recompense, as part of execution calldataerrorBaseFeeGtGasPrice(uint256 baseFee,uint256 jobMaxBaseFeeGwei);
//raised when one needs to catch a hypothetical error leading to no job type being picked despite the calldatasource being between 0 and 2 or when an attempt is made to register a job with the calldataSource value not being between 0 and 2 (0 corresponds to SELECTOR, 1 - to PRE_DEFINED, 2 - to RESOLVER, and no other types are extant)errorInvalidCalldataSource();
//raised when a resolver type job is called with no function input calldata passederrorMissingInputCalldata();
Scope (modifiers that raise this error):
_calldata_passed_to_resolver_job_assert
SelectorCheckFailed
//raised when the resolver selector provided by the kepeer in the execution calldata is compared (which is a step togglable by the Job owner) with the resolver selector stored in the binary representation of the job itself and does not matcherrorSelectorCheckFailed();
Scope (modifiers that raise this error):
_selector_check_assert
JobCallRevertedWithoutDetails
//raised inside of the job revert output handler function when the job reverted with no traceback message contained in the responseerrorJobCallRevertedWithoutDetails();
Scope (modifiers that raise this error):
_job_revert_handler
_CustomTracebackErrorMessage
//raised inside of the job revert output handler function when the function returns some traceback in its resposnebytesmemory executionResponse;if (!ok) {assembly ("memory-safe") {let size :=returndatasize()//function reverted with some message being returnedifgt(size,0) {//load free memory pointer executionResponse :=mload(0x40)//store the message size at free memory pointermstore(executionResponse, size)//add offset of 32 bytes, which is exactly the size of the message size, which is a uint256 valuelet p :=add(executionResponse,0x20)//copy "size" bytes of returndata, i.e. the entire message, starting from the first bytes, into memory starting at the offset pointerreturndatacopy(p,0, size)//store the new free memory pointermstore(0x40,add(executionResponse,add(32, size))) } } }//...////case of the preceding errorif (executionResponse_.length ==0) {revertJobCallRevertedWithoutDetails();} else {//load the execution response and revert with itassembly ("memory-safe") {revert(add(32, executionResponse_),mload(executionResponse_)) }
Scope (modifiers that raise this error):
_job_revert_handler
InsufficientAmountToCoverSlashedStake
//raised when a keeper attempts to withdraw some of his stake, with the amount specified being insufficient to cover the totality of the slashed liability he has accruederrorInsufficientAmountToCoverSlashedStake(uint256 wanted,uint256 actual);
//raised when a keeper attempts to withdraw more stake than he haserrorAmountGtStake(uint256 wanted,uint256 actualStake,uint256 actualSlashedStake);
Scope (modifiers that raise this error):
_amount_not_exceeds_stake_assertion
WithdrawalTimoutNotReached
//raised when a keeper attempts to finalise stake withdrawal before the Agent-specified timeout period pendingWithdrawalTimeoutSeconds elapses from the time of withdrawal initiationerrorWithdrawalTimoutNotReached();
Scope (modifiers that raise this error):
_withdrawal_time_limit_elapsed_assertion
NoPendingWithdrawal
//raised when a keeper attempts to finalise stake withdrawal whilst having no stake actually pending withdrawalerrorWithdrawalTimoutNotReached();
Scope (modifiers that raise this error):
_pending_withdrawal_extant_assertion
WithdrawAmountExceedsAvailable
//raised when a keeper attempts to withdraw more compensation (in native tokens) than he has accrued thus farerrorWithdrawAmountExceedsAvailable(uint256 wanted,uint256 actual);
Scope (modifiers that raise this error):
_amount_not_exceeds_available_assertion
JobShouldHaveInterval
//raised when an attempt is made to set a job of an interval type (SELECTOR or PRE_DEFINED) to have no (zero) intervalerrorJobShouldHaveInterval();
Scope (modifiers that raise this error):
_assertInterval
ResolverJobCantHaveInterval
//raised when an attempt is made to set a job of a non-interval (RESOLVER) type to have a nonzero intervalerrorResolverJobCantHaveInterval();
Scope (modifiers that raise this error):
_assertInterval
InvalidJobAddress
//raised when an attempt is made to register a job with the address being either the CVP token or this particular instance of Agent. This is made to prevent possible exploits. errorInvalidJobAddress();
Scope (modifiers that raise this error):
_job_address_not_cvp_or_agent_assertion
InvalidKeeperId
//raised when an attempt is made to increment the stake of a keeper with an ID greater than that of the last registered keeper, since such keepers cannot existerrorInvalidKeeperId();
Scope (modifiers that raise this error):
_assertKeeperIdExists
MissingResolverAddress
//raised when an attempt is made to set a job resolver with a zero (nonexistent) addresserrorMissingResolverAddress();
Scope (modifiers that raise this error):
_resolver_address_extant_assertion
NotSupportedByJobCalldataSource
//raised when a comparison between a provided calldataSource and the calldataSource of a job with a provided key do not match; used to make sure that e.g. one does not attempt to set predefined calldata for a non-PRE_DEFINED job. errorNotSupportedByJobCalldataSource();
Scope (modifiers that raise this error):
_assertJobCalldataSource
OnlyKeeperAdmin
//raised when an action available only to a keeper admin (worker address setting, finalising and initiating stake redemption) is attempted by an unauthorised usererrorOnlyKeeperAdmin();
Scope (modifiers that raise this error):
_assertOnlyKeeperAdmin
OnlyKeeperAdminOrJobOwner
//raised when an action available only to a keeper admin or a job owner is attempted by an unauthorised party. Not used in Flashbots. errorOnlyKeeperAdminOrJobOwner();
Scope (modifiers that raise this error):
None
OnlyKeeperAdminOrWorker
//raised when an action available only to a keeper admin or a worker (compensation withdrawal) is attempted by an unauthorised party. Not used in Flashbots. errorOnlyKeeperAdminOrJobOwner();
Scope (modifiers that raise this error):
_assertOnlyKeeperAdminOrWorker
TimeoutTooBig
//raised when an attempt is made by Agent owner to set a pendingWithdrawalTimeoutSeconds value (governing the size of the time interval that must elapse between initating and finishing withdrawal of staked CVP tokens) in excess of a global (i.e. shared between all inheritors of the base contract) constant MAX_PENDING_WITHDRAWAL_TIMEOUT_SECONDS, which has a value of 30 dayserrorTimeoutTooBig();
//raised when an attempt is made by Agent owner to set a feePpm value (governing the fee in parts per million the Agent retains from each deposit made to either a job token reserve or that of a job owner) in excess of a global (i.e. shared between all inheritors of the base contract) constant MAX_FEE_PPM, which has a value of 5e4errorFeeTooBig();
//raised when an attempt is made to register a keeper with the initial CVP stake deposit being smaller than demanded by the Agent parameter minKeeperCvperrorInsufficientAmount();
Scope (modifiers that raise this error):
_minKeeperCvp_assertion
OnlyPendingOwner
//raised when any user other than a pending owner invokes the acceptJobTransfer function; since the job transfer is a two-part process, only the user targeted at the first step as a pending owner may accept the transfererrorOnlyPendingOwner();
Scope (modifiers that raise this error):
_msg_sender_is_pending_owner_assertion
WorkerAlreadyAssigned
//raised when an attempt is made to set for a Keeper a worker address which coincides with that of any other registered keeper. Used to prevent setting two different keepers to have the same address. errorWorkerAlreadyAssigned();
Scope (modifiers that raise this error):
_assertWorkerNotAssigned
RanDAO implementation errors
Herein errors specific to the RanDAO implementation are listed.
JobHasKeeperAssigned
//raised when an attempt is made to assign a keeper to a job that already has one assigned; no two keepers can share a joberrorJobHasKeeperAssigned(uint256 keeperId);
Scope (modifiers that raise this error):
_job_has_no_keeper_assigned_assertion
SlashingEpochBlocksTooLow
//raised when an attempt is made to set the Agent parameter slashingEpochBlocks (determining the size of the divisor in the slasher assigment function, which has the meaning of the slashing epoch: the amount of blocks for which the only source of slasher distinctness is the job key for reason of all division rounding down to the nearest integer; during one slashing epoch each unique job always has the same slasher assigned to it, provided no changes in the keeper pool manifest) at a value less than 3 blocks
errorSlashingEpochBlocksTooLow();
Scope (modifiers that raise this error):
_slashing_period_long_enough_assertion
InvalidPeriod1
//raised when an attempt is made to set the Agent parameter period1, which corresponds to the length of the grace period during which the keeper may not be slashed irrespectively of his executing the job and the possibility of execution thereof, at a value less than 15 secondserrorInvalidPeriod1();
Scope (modifiers that raise this error):
_grace_period_long_enough_assertion
InvalidPeriod2
//raised when an attempt is made to set the Agent parameter period2, which corresponds to the length of the admissibility period during which the job is not considered overdue and cannot be released, i.e. removed from a keeper's pending jobs (possibility of re-initating slashing is also tied to the job being overdue), at a value less than 15 secondserrorInvalidPeriod2();
Scope (modifiers that raise this error):
_admissibility_period_long_enough_assertion
InvalidSlashingFeeFixedCVP
//raised when an attempt is made to set the Agent parameter slashingFeeFixedCVP, which corresponds to the fixed slash a keeper undergoes (in essence the lower bound on the slashed amount during any given slashing event) is not in excess of one half of the (Agent-level) minimal acceptable Keeper stakeerrorInvalidSlashingFeeFixedCVP();
Scope (modifiers that raise this error):
_slashing_fee_not_too_great_assertion
SlashingBpsGt5000Bps
//raised when an attempt is made to set the Agent parameter slashingFeeBps, which corresponds to the portion of the keeper stake that is slashed during any given slash event (the dynamic slash value) in basis points, is not in excess of 5000 bps (corresp. to 50%, which is precisely why the fixed slashing amount is capped at one half: at no point may any keeper be slashed for more than his entire stake)
errorSlashingBpsGt5000Bps();
Scope (modifiers that raise this error):
_slashing_bps_not_too_great_assertion
InvalidStakeDivisor
//raised when an attempt is made to set the Agent parameter stakeDivisor, which corresponds to the inverse of the coefficient by which stake of the keeper is multiplied to produce the fixed (wrt gas) component of the reward, is nonzeroerrorInvalidStakeDivisor();
Scope (modifiers that raise this error):
_fixed_reward_coeff_finite
InactiveKeeper
//raised if the keeper or slasher scoped by a function is not active (i.e. cannot slash or execute)errorInactiveKeeper();
Scope (modifiers that raise this error):
_keeper_active_assertion
KeeperIsAssignedToJobs
//raised if an attempt is made to disable or withdraw stake of a keeper that is currently assigned to jobs (and has them pending)errorKeeperIsAssignedToJobs(uint256 amountOfJobs);
Scope (modifiers that raise this error):
_keeper_releasable_assertion
OnlyCurrentSlasher
//raised if an attempt to initiate resolver job slashing or perform slashing of an interval job is made by a keeper distinct from the slasher currently assigned to this joberrorOnlyCurrentSlasher(uint256 expectedSlasherId);
Scope (modifiers that raise this error):
_is_current_slasher_assertion
OnlyReservedSlasher
//raised if an attempt to perform slashing of a resolver job keeper is made by a slasher that did not initiate its slashing (that keeper is associated with the job key by means of the jobReservedSlasherId mapping)errorOnlyReservedSlasher(uint256 reservedSlasherId);
Scope (modifiers that raise this error):
_is_reserved_slasher_assertion
TooEarlyForSlashing
//raised if an attempt is made to slash a keeper of a resolver job is made before the grace period elapseserrorTooEarlyForSlashing(uint256 now_,uint256 possibleAfter);
//raised if an attempt is made to slash a keeper of a resolver job is made without initiating slashing thereof firsterrorSlashingNotInitiated();
Scope (modifiers that raise this error):
_slashing_initiated_assertion
SlashingNotInitiatedExecutionReverted
//raised in the scope of _afterExecutionReverted if a resolver job has reverted, and it is found that slashing was not yet inititaederrorSlashingNotInitiatedExecutionReverted();
Scope (modifiers that raise this error):
_handle_revert_no_slashing
KeeperCantSlash
//raised if an attempt is made to make the keeper assigned to the job also a slasher thereof. Prevents people from dodging punishment by declaring the same worker both a keeper and a slasher. errorKeeperCantSlash();
Scope (modifiers that raise this error):
_keeper_no_slasher_assertion
KeeperIsAlreadyActive
//raised if an attempt is made to activate an already active keepererrorKeeperIsAlreadyActive();
Scope (modifiers that raise this error):
_keeper_not_active_assertion
KeeperIsAlreadyInactive
//raised if an attempt is made to deactivate an already inactive keepererrorKeeperIsAlreadyInactive();
Scope (modifiers that raise this error):
_keeper_not_inactive_assertion
UnexpectedCodeBlock
//raised as a safeguard: to check executability of a task without engendering any lasting state changes, an always-reverting function checkCouldBeExecuted is used, which on success reverts with the error JobCheckCanBeExecuted, and on fail - with the error JobCheckCanNotBeExecuted. If for some reason checkCouldBeExecuted does not revert, this is caught and handled by the UnexpectedCodeBlock errorerrorUnexpectedCodeBlock();
Scope (modifiers that raise this error):
_unexpected_nonrevert_safeguard
InitiateSlashingUnexpectedError
//raised to safeguard against an eventuality whereby checkCouldBeExecuted reverts, but the error selector does not match that of either of the two possible errors JobCheckCanBeExecuted and JobCheckCanNotBeExecutederrorInitiateSlashingUnexpectedError();
Scope (modifiers that raise this error):
_unexpected_selector_handler
NonIntervalJob
//raised when an attempt to initiate slashing of an interval job is made; the interval jobs do not require or even admit initiation of slashing, since for them the timestamp from which execution is possible is known exactly in advanceerrorNonIntervalJob();
Scope (modifiers that raise this error):
_no_initiating_for_interval_jobs
JobCheckResolverError
//raised when an attempt is made to initiate slashing for a job for which the resolver (currently) reverts. Used to prevent abuses from the slasher side.errorJobCheckResolverError(bytes errReason);
Scope (modifiers that raise this error):
_resolver_terminated_successfully_assertion
JobCheckResolverReturnedFalse
//raised when an attempt is made to initiate slashing for a job that is not currently executable (the resolver executes, but returns False for the field of execution admissibility). Used to prevent abuses from the slasher side.errorJobCheckResolverReturnedFalse();
Scope (modifiers that raise this error):
_resolver_returned_true_assertion
TooEarlyToReinitiateSlashing
//raised when an attempt is made to re-initiate slashing of a job that is already initiated and not yet overdue (i.e. at least period2 has not elapsed since the timestamp at which slashing became possible)errorTooEarlyToReinitiateSlashing();
Scope (modifiers that raise this error):
_slashing_period_elapsed_assertion
JobCheckCanBeExecuted
//A technical error used to revert checkCouldBeExecuted when job execution is possible (i.e. the call with the job calldata to a job address does not revert)errorJobCheckCanBeExecuted();
Scope (modifiers that raise this error):
_revert_with_true
JobCheckCanNotBeExecuted
//A technical error used to revert checkCouldBeExecuted when job execution is not possible (i.e. the call with the job calldata to a job address does revert)errorJobCheckCanNotBeExecuted(bytes errReason);
Scope (modifiers that raise this error):
_revert_with_false
TooEarlyToRelease
//raised when an attempt is made to release the job (i.e. unassign the keeper marked for execution) before the job is overdue (i.e. before the period1 elapsed, allowing slashing, and period2 elapsed, ending the admissibility period and unlocking the keeper)errorTooEarlyToRelease(bytes32 jobKey,uint256 period2End);
Scope (modifiers that raise this error):
_lockup_period_expired_assertion
TooEarlyForActivationFinalization
//raised when an attempt is made to finalise activation of a keeper before one can do so (i.e. before the keeperActivationCanBeFinalizedAt value)errorTooEarlyForActivationFinalization(uint256 now,uint256 availableAt);
Scope (modifiers that raise this error):
_keeper_activation_timeout_elapsed_assertion
CantRelease
//raised when an attempt is made to release the resolver job (i.e. unassign the keeper marked for execution) for which slashing has not yet been initiated errorCantRelease();
//raised if an attempt is made to slash a keeper of an interval job is made before the grace period elapseserrorOnlyNextKeeper(uint256 expectedKeeperId,uint256 lastExecutedAt,uint256 interval,uint256 slashingInterval,uint256 _now );
//raised in the hypothetical case of an attempt to slash a keeper for more stake than he has. This should never happen, though, due to the way the maximal static and dynamic slash amounts are set. errorInsufficientKeeperStakeToSlash(bytes32 jobKey,uint256 expectedKeeperId,uint256 keeperCurrentStake,uint256 amountToSlash );