Documentation ¶
Overview ¶
Package guard signs attestations and posts to attestation collector and destination.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationCollectorAttestationScanner ¶
type AttestationCollectorAttestationScanner struct {
// contains filtered or unexported fields
}
AttestationCollectorAttestationScanner fetches attestations for particular origin-destination pair. TODO: this needs to become an interface.
func NewAttestationCollectorAttestationScanner ¶
func NewAttestationCollectorAttestationScanner(domain domains.DomainClient, originID, destinationID uint32, db db.SynapseDB, signer signer.Signer, interval time.Duration) AttestationCollectorAttestationScanner
NewAttestationCollectorAttestationScanner creates a new attestation collector attestation scanner.
func (AttestationCollectorAttestationScanner) FindLatestNonce ¶
func (a AttestationCollectorAttestationScanner) FindLatestNonce(ctx context.Context) (nonce uint32, err error)
FindLatestNonce fetches the latest cached nonce for a given chain. TODO (joe): there was a bug in this code not covered by current tests. Make sure to add a test that covers when latestNonce is not zero.
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
Guard in the current version scans the attestation collector for notary signed attestations, signs them, and posts to destination chains. TODO: Note right now, I have threads for each origin-destination pair and do no batching at all.