Documentation ¶
Overview ¶
Package notary scans origin chains for messages to its destination and signs attestations and posts to AttestationCollector.
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( originDomain domains.DomainClient, attestationDomain domains.DomainClient, destinationDomain domains.DomainClient, db db.SynapseDB, bondedSigner signer.Signer, unbondedSigner 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( originDomain domains.DomainClient, attestationDomain domains.DomainClient, destinationDomain domains.DomainClient, db db.SynapseDB, bondedSigner signer.Signer, unbondedSigner signer.Signer, interval time.Duration) OriginAttestationSigner
NewOriginAttestationSigner creates a new origin attestation signer.
func (OriginAttestationSigner) FindNewestUnsignedAttestation ¶ added in v0.0.96
func (a OriginAttestationSigner) FindNewestUnsignedAttestation(ctx context.Context) (types.InProgressAttestation, error)
FindNewestUnsignedAttestation fetches the newest 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( originDomain domains.DomainClient, attestationDomain domains.DomainClient, destinationDomain domains.DomainClient, db db.SynapseDB, bondedSigner signer.Signer, unbondedSigner signer.Signer, interval time.Duration) OriginAttestationSubmitter
NewOriginAttestationSubmitter creates a new origin attestation submitter.
func (OriginAttestationSubmitter) FindNewestUnsubmittedAttestation ¶ added in v0.0.96
func (a OriginAttestationSubmitter) FindNewestUnsubmittedAttestation(ctx context.Context) (types.InProgressAttestation, error)
FindNewestUnsubmittedAttestation fetches the newest 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( originDomain domains.DomainClient, attestationDomain domains.DomainClient, destinationDomain domains.DomainClient, db db.SynapseDB, bondedSigner signer.Signer, unbondedSigner signer.Signer, interval time.Duration) OriginAttestationVerifier
NewOriginAttestationVerifier creates a new origin attestation verifier.
func (OriginAttestationVerifier) FindNewestUnconfirmedAttestation ¶ added in v0.0.96
func (a OriginAttestationVerifier) FindNewestUnconfirmedAttestation(ctx context.Context) (types.InProgressAttestation, error)
FindNewestUnconfirmedAttestation fetches the newest attestation that still needs to be confirmed.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package api contains the API for the notary.
|
Package api contains the API for the notary. |
Package cmd provides the command line interface for the notary.
|
Package cmd provides the command line interface for the notary. |
Package main provides the main function for the Notary.
|
Package main provides the main function for the Notary. |