InterfaceLightInbox

Git Source

Functions

submitAttestation

Accepts an attestation signed by a Notary and passes it to Destination contract to save.

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:

  • Attestation payload is not properly formatted.
  • Attestation signer is not an active Notary for local domain.
  • Attestation signer is in Dispute.
  • Attestation's snapshot root has been previously submitted.
  • Attestation's data hash doesn't match the hash of provided agentRoot and snapshot gas data.
function submitAttestation(
    bytes memory attPayload,
    bytes memory attSignature,
    bytes32 agentRoot,
    uint256[] memory snapGas
) external returns (bool wasAccepted);

Parameters

NameTypeDescription
attPayloadbytesRaw payload with Attestation data
attSignaturebytesNotary signature for the attestation
agentRootbytes32Agent Merkle Root from the Attestation
snapGasuint256[]Gas data for each chain in the snapshot

Returns

NameTypeDescription
wasAcceptedboolWhether the Attestation was accepted

submitAttestationReport

Accepts a Guard's attestation report signature, as well as Notary signature for the reported Attestation.

AttestationReport is a Guard statement saying "Reported attestation is invalid".

  • This results in an opened Dispute between the Guard and the Notary.
  • Note: Guard could (but doesn't have to) form a AttestationReport and use attestation signature from verifyAttestation() successful call that led to Notary being slashed in Summit on Synapse Chain.

Will revert if any of these is true:

  • Attestation payload is not properly formatted.
  • Attestation Report signer is not an active Guard.
  • Attestation signer is not an active Notary for local domain.
function submitAttestationReport(bytes memory attPayload, bytes memory arSignature, bytes memory attSignature)
    external
    returns (bool wasAccepted);

Parameters

NameTypeDescription
attPayloadbytesRaw payload with Attestation data that Guard reports as invalid
arSignaturebytesGuard signature for the report
attSignaturebytesNotary signature for the reported attestation

Returns

NameTypeDescription
wasAcceptedboolWhether the Report was accepted (resulting in Dispute between the agents)