InterfaceDestination
Functions
passAgentRoot
Attempts to pass a quarantined Agent Merkle Root to a local Light Manager.
Will do nothing, if root optimistic period is not over.
function passAgentRoot() external returns (bool rootPending);
Returns
Name | Type | Description |
---|---|---|
rootPending | bool | Whether there is a pending agent merkle root left |
acceptAttestation
Accepts an attestation, which local AgentManager
verified to have been signed
by an active Notary for this chain.
Attestation is created whenever a Notary-signed snapshot is saved in Summit on Synapse Chain.
- Saved Attestation could be later used to prove the inclusion of message in the Origin Merkle Tree.
- Messages coming from chains included in the Attestation's snapshot could be proven.
- Proof only exists for messages that were sent prior to when the Attestation's snapshot was taken.
Will revert if any of these is true:
- Called by anyone other than local
AgentManager
.- Attestation payload is not properly formatted.
- Attestation signer is in Dispute.
- Attestation's snapshot root has been previously submitted. Note: agentRoot and snapGas have been verified by the local
AgentManager
.
function acceptAttestation(
uint32 notaryIndex,
uint256 sigIndex,
bytes memory attPayload,
bytes32 agentRoot,
ChainGas[] memory snapGas
) external returns (bool wasAccepted);
Parameters
Name | Type | Description |
---|---|---|
notaryIndex | uint32 | Index of Attestation Notary in Agent Merkle Tree |
sigIndex | uint256 | Index of stored Notary signature |
attPayload | bytes | Raw payload with Attestation data |
agentRoot | bytes32 | Agent Merkle Root from the Attestation |
snapGas | ChainGas[] | Gas data for each chain in the Attestation's snapshot |
Returns
Name | Type | Description |
---|---|---|
wasAccepted | bool | Whether the Attestation was accepted |
attestationsAmount
Returns the total amount of Notaries attestations that have been accepted.
function attestationsAmount() external view returns (uint256);
getAttestation
Returns a Notary-signed attestation with a given index.
Index refers to the list of all attestations accepted by this contract.
Attestations are created on Synapse Chain whenever a Notary-signed snapshot is accepted by Summit. Will return an empty signature if this contract is deployed on Synapse Chain.
function getAttestation(uint256 index) external view returns (bytes memory attPayload, bytes memory attSignature);
Parameters
Name | Type | Description |
---|---|---|
index | uint256 | Attestation index |
Returns
Name | Type | Description |
---|---|---|
attPayload | bytes | Raw payload with Attestation data |
attSignature | bytes | Notary signature for the reported attestation |
getGasData
Returns the gas data for a given chain from the latest accepted attestation with that chain.
Will return empty values if there is no data for the domain, or if the notary who provided the data is in dispute.
function getGasData(uint32 domain) external view returns (GasData gasData, uint256 dataMaturity);
Parameters
Name | Type | Description |
---|---|---|
domain | uint32 | Domain for the chain |
Returns
Name | Type | Description |
---|---|---|
gasData | GasData | Gas data for the chain |
dataMaturity | uint256 | Gas data age in seconds |
destStatus
Returns status of Destination contract as far as snapshot/agent roots are concerned
function destStatus() external view returns (uint40 snapRootTime, uint40 agentRootTime, uint32 notaryIndex);
Returns
Name | Type | Description |
---|---|---|
snapRootTime | uint40 | Timestamp when latest snapshot root was accepted |
agentRootTime | uint40 | Timestamp when latest agent root was accepted |
notaryIndex | uint32 | Index of Notary who signed the latest agent root |
nextAgentRoot
Returns Agent Merkle Root to be passed to LightManager once its optimistic period is over.
function nextAgentRoot() external view returns (bytes32);
lastAttestationNonce
Returns the nonce of the last attestation submitted by a Notary with a given agent index.
Will return zero if the Notary hasn't submitted any attestations yet.
function lastAttestationNonce(uint32 notaryIndex) external view returns (uint32);