Documentation ¶
Overview ¶
Package notary attests to updates
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationProducer ¶
type AttestationProducer struct {
// contains filtered or unexported fields
}
AttestationProducer updates a producer. TODO: this needs to become an interface.
func NewAttestationProducer ¶
func NewAttestationProducer(domain domains.DomainClient, db db.SynapseDB, signer signer.Signer, interval time.Duration) AttestationProducer
NewAttestationProducer creates an attestation producer.
func (AttestationProducer) FindLatestNonce ¶
func (a AttestationProducer) FindLatestNonce(ctx context.Context) (nonce uint32, err error)
FindLatestNonce fetches the latest nonce for a given chain.
type AttestationSubmitter ¶
type AttestationSubmitter struct {
// contains filtered or unexported fields
}
AttestationSubmitter submits updates continuously.
func NewAttestationSubmitter ¶
func NewAttestationSubmitter(domain domains.DomainClient, db db.SynapseDB, signer signer.Signer, interval time.Duration) AttestationSubmitter
NewAttestationSubmitter creates an update producer.
type Notary ¶
type Notary struct {
// contains filtered or unexported fields
}
Notary in the current version scans the origins for new messages, signs them, and posts to attestation collector. TODO: Note right now, I have threads for each origin-destination pair and do no batching at all in terms of calls to the origin. Right now, for this MVP, this is the simplest path and we can make improvements later.
type OriginAttestationScanner ¶ added in v0.0.58
type OriginAttestationScanner struct {
// contains filtered or unexported fields
}
OriginAttestationScanner fetches merkle roots for particular origin-destination pair. TODO: this needs to become an interface.
func NewOriginAttestationScanner ¶ added in v0.0.58
func NewOriginAttestationScanner(domain domains.DomainClient, destinationID uint32, db db.SynapseDB, signer signer.Signer, interval time.Duration) OriginAttestationScanner
NewOriginAttestationScanner creates a new origin attestation scanner.
func (OriginAttestationScanner) FindLatestNonce ¶ added in v0.0.58
func (a OriginAttestationScanner) FindLatestNonce(ctx context.Context) (nonce uint32, err error)
FindLatestNonce fetches the latest nonce for a given chain.
type OriginAttestationSigner ¶ added in v0.0.58
type OriginAttestationSigner struct {
// contains filtered or unexported fields
}
OriginAttestationSigner signs unsigned attestations that have been fetched for particular origin-destination pair. TODO: this needs to become an interface.
func NewOriginAttestationSigner ¶ added in v0.0.58
func NewOriginAttestationSigner(domain domains.DomainClient, destinationID uint32, db db.SynapseDB, signer signer.Signer, interval time.Duration) OriginAttestationSigner
NewOriginAttestationSigner creates a new origin attestation signer.
func (OriginAttestationSigner) FindOldestUnsignedAttestation ¶ added in v0.0.58
func (a OriginAttestationSigner) FindOldestUnsignedAttestation(ctx context.Context) (types.InProgressAttestation, error)
FindOldestUnsignedAttestation fetches the oldest attestation that still needs to be signed.
type OriginAttestationSubmitter ¶ added in v0.0.58
type OriginAttestationSubmitter struct {
// contains filtered or unexported fields
}
OriginAttestationSubmitter submits signed attestations to the attestation collector for particular origin-destination pair. TODO: this needs to become an interface.
func NewOriginAttestationSubmitter ¶ added in v0.0.58
func NewOriginAttestationSubmitter(domain domains.DomainClient, destinationID uint32, db db.SynapseDB, signer signer.Signer, interval time.Duration) OriginAttestationSubmitter
NewOriginAttestationSubmitter creates a new origin attestation submitter.
func (OriginAttestationSubmitter) FindOldestUnsubmittedAttestation ¶ added in v0.0.58
func (a OriginAttestationSubmitter) FindOldestUnsubmittedAttestation(ctx context.Context) (types.InProgressAttestation, error)
FindOldestUnsubmittedAttestation fetches the oldest unsubmitted attestation that has been signed.
type OriginAttestationVerifier ¶ added in v0.0.58
type OriginAttestationVerifier struct {
// contains filtered or unexported fields
}
OriginAttestationVerifier verifies that the AttestationCollector in fact posted submitted attestations and if not resubmits. TODO: this needs to become an interface.
func NewOriginAttestationVerifier ¶ added in v0.0.58
func NewOriginAttestationVerifier(domain domains.DomainClient, destinationID uint32, db db.SynapseDB, signer signer.Signer, interval time.Duration) OriginAttestationVerifier
NewOriginAttestationVerifier creates a new origin attestation verifier.
func (OriginAttestationVerifier) FindOldestUnconfirmedAttestation ¶ added in v0.0.58
func (a OriginAttestationVerifier) FindOldestUnconfirmedAttestation(ctx context.Context) (types.InProgressAttestation, error)
FindOldestUnconfirmedAttestation fetches the oldest attestation that still needs to be confirmed.