Skip to content

Commit 0d982ae

Browse files
authored
chore: symmetric BN254 and ECDSA checks (#1540)
**Motivation:** The `ECDSACertificateVerifier` does not do the same timetstamp checks as the `BN254CertificateVerifier`. It also prevents 0 staleness period and requires certificates to be against the latest reference timestamp **Modifications:** - Update storage of certificate verifiers to have a `_referenceTimestampsSet` mapping - Add `isReferenceTimestampSet` introspection - Allow 0 staleness period for `ECDSACertificateVerifier` - Update the `BN254CertificateVerifier` and `ECDSACertificateVerifier` to have checks be in the same order against reference timestamp **Result:** Consistent code paths
1 parent 23c29ce commit 0d982ae

File tree

25 files changed

+1499
-296
lines changed

25 files changed

+1499
-296
lines changed

docs/multichain/destination/CertificateVerifier.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Note that updating operator tables for a `referenceTimestamp` that is less than
8181
* Updates `_latestReferenceTimestamps[operatorSetKey]` to `referenceTimestamp`
8282
* Updates `_operatorSetOwners[operatorSetKey]` to `operatorSetConfig.owner`
8383
* Updates `_maxStalenessPeriods[operatorSetKey]` to `operatorSetConfig.maxStalenessPeriod`
84+
* Updates `_isReferenceTimestampSet[operatorSetKey][referenceTimestamp]` to `true`
8485
* Emits a `TableUpdated` event
8586

8687
*Requirements*:
@@ -329,6 +330,7 @@ Note that updating operator tables for a `referenceTimestamp` that is less than
329330
* Updates `_latestReferenceTimestamps[operatorSetKey]` to `referenceTimestamp`
330331
* Updates `_operatorSetOwners[operatorSetKey]` to `operatorSetConfig.owner`
331332
* Updates `_maxStalenessPeriods[operatorSetKey]` to `operatorSetConfig.maxStalenessPeriod`
333+
* Updates `_isReferenceTimestampSet[operatorSetKey][referenceTimestamp]` to `true`
332334
* Emits a `TableUpdated` event
333335

334336
*Requirements*:

pkg/bindings/BN254CertificateVerifier/binding.go

Lines changed: 33 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/BN254CertificateVerifierStorage/binding.go

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/CrossChainRegistry/binding.go

Lines changed: 200 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/CrossChainRegistryStorage/binding.go

Lines changed: 187 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/ECDSACertificateVerifier/binding.go

Lines changed: 33 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/ECDSACertificateVerifierStorage/binding.go

Lines changed: 126 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/IBN254CertificateVerifier/binding.go

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/IBaseCertificateVerifier/binding.go

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)