Omission Accountability Contract Interface

Interface for interacting with Autonity Omission Accountability Contract functions using:

Protocol contract calls

Examples for calling functions from aut use the setup described in the How to Submit a transaction with Autonity CLI.

Usage and Examples illustrate using the Accountability Contract’s generated ABI and the aut tool’s contract command to call the Omission Accountability Contract address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105. See aut contract call --help.

Usage and Examples assume the path to the ABI file has been set in aut’s configuration file .autrc. The OmissionAccountability.abi file is generated when building the client from source and can be found in your autonity installation directory at ./params/generated/OmissionAccountability.abi. Alternatively, you can generate the ABI using the abigen cmd utility if you built from source (See Install Autonity, Build from source code).

getAbsenteesLastHeight

Returns an array of consensus committee members absent from consensus at the last block height.

Parameters

None.

Response

Field Datatype Description
newDelta address[] an array of validator identifier addresses that were absentees of last height

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getAbsenteesLastHeight

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getAbsenteesLastHeight
["0x3597d2D42f8Fbbc82E8b1046048773aD6DDB717E", "0xBBf36374eb23968F25aecAEbb97BF3118f3c2fEC", "0xe877FcB4b26036Baa44d3E037117b9e428B1Aa65"]

getConfig

Returns the Autonity Network configuration at the block height the call was submitted.

Parameters

None.

Response

Returns a Config object consisting of:

Field Datatype Description
inactivityThreshold uint256 the threshold for flagging validator inactivity
lookbackWindow uint256 the number of blocks over which the protocol will look for inactivity
pastPerformanceWeight uint256 how much weight is given to past performance of the validator in the preceding epoch in the current epoch when computing the aggregated inactivity score
initialJailingPeriod uint256 the initial number of block(s) that a validator will be jailed for
initialProbationPeriod uint256 the initial number of epoch(s) that a validator will be set under probation for
initialSlashingRate uint256 the initial slashing rate used with the offence count and collusion degree when computing the slashing amount of a penalty
delta uint256 the number of blocks to wait before generating an activity proof

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getConfig

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getConfig
{"inactivityThreshold": 1000, "lookbackWindow": 40, "pastPerformanceWeight": 1000, "initialJailingPeriod": 10000, "initialProbationPeriod": 24, "initialSlashingRate": 25, "delta": 5}

getDelta

Returns the delta used to determine how many blocks to wait before generating the activity proof. If the delta will change at epoch end, the new value will be returned.

Parameters

None.

Response

Field Datatype Description
newDelta uint256 the delta number of blocks to wait before generating the activity proof

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getDelta

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getDelta
5

getInactivityScore

Returns the inactivity score of a validator for the last finalized epoch.

Parameters

Field Datatype Description
node address identifier address of the offending validator

Response

Field Datatype Description
inactivityScores uint256 the inactivity score of the validator in the last finalized epoch

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getInactivityScore _validator

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getInactivityScore 0x9C7dAABb5101623340C925CFD6fF74088ff5672e
2419

getScaleFactor

Returns the scale factor used for fixed point computation of the inactivity score in the Omission Accountability contract.

Parameters

None.

Response

Field Datatype Description
scale factor uint256 the scale factor used for fixed point computations

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getScaleFactor

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getScaleFactor
10000

getLookbackWindow

Returns the lookback window value and whether an update of it is in progress. If the lookback window will change at epoch end, the new value will be returned.

Parameters

None.

Response

Field Datatype Description
newLookbackWindow uint256 the lookback window current value

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getLookbackWindow

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getLookbackWindow
40

getTotalEffort

Returns the total proposer effort accumulated up to this block.

What is proposer effort?

Total effort is a cumulative sum of the effort of each Activity Proof over the epoch. The effort of an individual Activity Proof is defined as the voting power included in it minus the value of the Quorum voting power for that epoch.

Parameters

None.

Response

Field Datatype Description
totalEffort uint256 the total proposer effort accumulated up to this block

Usage

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getTotalEffort

Example

aut contract call --address 0x117814AF22Cb83D8Ad6e8489e9477d28265bc105 getTotalEffort
1076699099422990542039881652