Relay
Last updated
Last updated
This file documents a contract which is not yet deployed to Mainnet.
Seed used as the first relay entry value. It's a G1 point G * PI = G * 31415926535897932384626433832795028841971693993751058209749445923078164062862 Where G is the generator of G1 abstract cyclic group.
Initializes the very first previousEntry
with an initial relaySeed
value. Can be performed only once.
Creates a request to generate a new relay entry, which will include a random number (by signing the previous entry's random number).
Creates a new relay entry. Gas-optimized version that can be called only before the soft timeout. This should be the majority of cases.
Creates a new relay entry. Can be called at any time. In case the soft timeout has not been exceeded, it is more gas-efficient to call the second variation of submitEntry
.
Calculates the slashing amount for all group members.
Must be used when a soft timeout was hit.
Updates relay-related parameters
Set relayEntrySubmissionFailureSlashingAmount parameter.
Retries the current relay request in case a relay entry timeout was reported.
Cleans up the current relay request in case a relay entry timeout was reported.
Returns whether a relay entry request is currently in progress.
Returns whether the current relay request has timed out.
Calculates soft timeout block for the pending relay request.
self
struct Relay.Data
groupId
uint64
Identifier of the group chosen to handle the request.
self
struct Relay.Data
entry
bytes
Group BLS signature over the previous entry.
groupPubKey
bytes
Public key of the group which signed the relay entry.
self
struct Relay.Data
entry
bytes
Group BLS signature over the previous entry.
groupPubKey
bytes
Public key of the group which signed the relay entry.
[0]
uint96
slashingAmount Amount by which group members should be slashed in case the relay entry was submitted after the soft timeout. The value is zero if entry was submitted on time.
[0]
uint96
Amount by which group members should be slashed in case the relay entry was submitted after the soft timeout.
self
struct Relay.Data
_relayEntrySoftTimeout
uint256
New relay entry soft timeout value. It is the time in blocks during which a result is expected to be submitted so that the group is not slashed.
_relayEntryHardTimeout
uint256
New relay entry hard timeout value. It is the time in blocks for a group to submit the relay entry before slashing for the full slashing amount happens.
self
struct Relay.Data
newRelayEntrySubmissionFailureSlashingAmount
uint96
New value of the parameter.
self
struct Relay.Data
newGroupId
uint64
ID of the group chosen to retry the current request.
[0]
bool
True if there is a request in progress. False otherwise.
[0]
bool
True if the request timed out. False otherwise.
[0]
uint256
The soft timeout block