fix: resolve smart contract issues #412 #413 #414 #415#432
Merged
feyishola merged 2 commits intoApr 28, 2026
Merged
Conversation
, Servora#415 - Servora#415: Add expires_at timestamp check in batch_verify_certificates so Active certs past their expiry are counted as failed - Servora#414: Add cross-contract certificate existence check in CRLContract.revoke_certificate; initialize now accepts a certificate_contract Address and stores it; revoke panics if the certificate does not exist in CertificateContract - Servora#413: Remove unrevoke_certificate from CRLContract; certificate revocation is permanent per PKI best practices; also removed the now-dead remove_certificate_id helper - Servora#412: Rename DataKey to StorageKey in storage.rs to eliminate the naming conflict with the public DataKey in types.rs; update storage_helpers.rs accordingly Also adds certificate_exists() helper to CertificateContract to support the CRL cross-contract existence check.
|
@BigBen-7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Use dorny/paths-filter to detect which workspace changed and skip unaffected jobs. This prevents pre-existing frontend/backend TS errors from failing contract-only PRs (and vice versa).
feyishola
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes four smart contract bugs/enhancements assigned to me.
#415 —
batch_verify_certificatesdoesn't check expirationAdded an
expires_attimestamp check alongside the status flags. A certificate withActivestatus but a pastexpires_atis now correctly counted as failed, consistent withis_valid().#414 — No certificate existence check before revocation in CRL
CRLContract.initializenow accepts acertificate_contract: Addressparameter and stores it.revoke_certificateperforms a cross-contract call toCertificateContract.certificate_exists()before adding to the CRL. Panics with"Certificate does not exist"if the ID is unknown.certificate_exists()helper toCertificateContract.#413 —
unrevoke_certificateshould not existRemoved
unrevoke_certificatefromCRLContract. Certificate revocation is permanent and irreversible per PKI best practices. Also removed the now-deadremove_certificate_idhelper.#412 — Duplicate
DataKeyenum instorage.rsRenamed
DataKey→StorageKeyinstorage.rsto eliminate the naming conflict with the publicDataKeyintypes.rs. Updatedstorage_helpers.rsto useStorageKey.Files Changed
stellar-contracts/src/lib.rs— expiration check inbatch_verify_certificates, newcertificate_exists()stellar-contracts/src/crl.rs— existence check, removedunrevoke_certificate, newCertContractstorage keystellar-contracts/src/storage.rs—DataKey→StorageKeystellar-contracts/src/storage_helpers.rs— updated toStorageKeyCloses #412
Closes #413
Closes #414
Closes #415