pyth-crosschain/third_party
Stanisław Drozd 1978d73b94
attester: Add an on-chain last attestation timestamp and rate limit arg (#622)
* attester: Add an on-chain last attestation timestamp and rate limit

In consequence, attester clients are able to rate-limit attestations
among _all_ active attesters - because the new last attestation timestamp is kept up
to date on chain. Ultimately, this value being shared by concurrent clients,
this feature limits our tx expenses while fulfilling our preferred attestation rates.

* attester: Use custom error code instead of log for rate limit

* attester: Add defaults for default attestation conditions

* attester: Use a dedicated function for rate limit default

* attester: Option<u32> -> u32 rate limit interval

This lets users pass 0 to disable the feature (0-rate limiting means
no rate limiting at all), which was not possible with the Option type.
2023-02-24 15:03:57 +01:00
..
pyth attester: Add an on-chain last attestation timestamp and rate limit arg (#622) 2023-02-24 15:03:57 +01:00