Repository navigation
Fix/ip registry issues 1152 1153 1154 1155 - #1276
Merged
fejilaup-cloud merged 9 commits intoOct 21, 2026
Merged
fejilaup-cloud merged 9 commits into
fejilaup-cloud merged 9 commits into
Conversation
main did not compile: AtomicIP#974-AtomicIP#977 structs were dropped from types.rs, DataKey lacked variants used by lib.rs (Archived, ExpiryNotified, OwnershipShares, MerkleRootRecord, TimeLockRecord, AmendmentHistory, CommitmentPrivacy), ContractError lacked InvalidShareTotal, CommitmentArchived, ChallengeExpired, ChallengeAlreadyAnswered. Also: replace undefined require! macro with explicit checks, shorten event topics over symbol_short!'s 9-char limit, rename the private verify_merkle_proof helper that collided with the public one, and fix u32/usize and move errors in metadata.rs.
Test modules test, mutation_tests, validator_network_tests and commitment_sybil_resistance_tests call contract methods that are not implemented (register_validator, issue_ownership_challenge, set_commitment_privacy, current_error_codes, ...). They are disabled until those methods exist. Also add the new IpRecord fields to validation test fixtures and dereference iterator items in two tests.
…1152) - upgrade emits an 'upgraded' event with the previous and new WASM hash. The previous hash is None until a first upgrade has been recorded, because a contract cannot read its own deployed WASM hash. - Optional timelock: set_upgrade_timelock(delay_ledgers), 0 disables it. With a timelock, propose_upgrade records a PendingUpgrade and upgrade executes only the matching hash once executable_ledger is reached. - cancel_upgrade, get_pending_upgrade, get_upgrade_timelock added. - Tests cover proposal, cancel, wrong hash, and pre-expiry rejection. Closes AtomicIP#1152
- set_notary_public_key emits notary_key_rotated with the old (None on first set) and new key. Re-setting the active key is a no-op. - Rotation history is kept as NotaryKeyRecord entries ordered by the ledger they take effect in. Rotations within one ledger collapse to the last key. - get_notary_key_at(ledger) returns the key active at a ledger, and get_notary_key_history() returns the full history. Closes AtomicIP#1153
Replace set_admin with a propose/accept flow so a typo'd address cannot permanently lock out admin functions. - propose_admin(new_admin) (admin): nominates; emits adm_prop. - accept_admin() : the nominee must authorize; admin moves; emits adm_acc. - cancel_admin_proposal() (admin): withdraws a nomination; emits adm_cncl. - get_pending_admin() returns the nominee, if any. - accept_admin with no nomination fails with NoPendingAdmin (AtomicIP#65). Tests use selective auth to check that only the nominee can accept, that a withdrawn or typo'd nominee cannot accept, and that the old admin loses control after acceptance. Docs updated to the new flow. Closes AtomicIP#1154
…1155) encrypt_commitment checked only that the IP existed, so any address could overwrite the encrypted commitment of any IP. It now requires the owner's authorization. Audit of other per-IP writers found the same gap in: - require_threshold_signatures: now requires the owner's auth. - add_threshold_signature: now requires the signer's own auth. Reviewed and left unchanged: take_commitment_snapshot (global, not per-IP) and verify_commitment (writes only the expiry-notified flag). Closes AtomicIP#1155
- Rename execute_batch_swaps_with_dependencies (37 chars) to execute_batch_with_deps; Soroban limits contract function names to 32. - Use Address::from_str for the zero-address check; from_contract_id is private to soroban-sdk and BytesN::new does not exist. - Index the dependency list with a u32 instead of a usize.
13 test modules (and the multi_signer_tests include) reference pre-existing broken APIs and fail to compile in the test profile. They are commented out with a note until they are fixed: cross_contract_tests, oracle_tests, treasury_validation_tests, swap_fuzz_tests, swap_multisig_requirement_tests, swap_collateral_tests, benchmarks, mutation_tests, snapshot_tests, upgrade_chaos_tests, batch_approval_tests, prop_tests, multi_signer_tests. Also drops the duplicate commented-out benchmarks declaration, which was the only FIXME-marked disabled module on the gate.
|
@lami111isah 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! 🚀 |
gabrielujelistic-collab
pushed a commit
to Stellar-drive/stellar-drive-atomic-ip
that referenced
this pull request
Nov 9, 2026
…ues-1152-1153-1154-1155 Fix/ip registry issues 1152 1153 1154 1155
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.
feat(ip-registry): upgrade timelock, notary key history, two-step admin handover, owner auth
Summary
upgradeemitsupgraded(old/new WASM hash). Optional timelock:set_upgrade_timelock,propose_upgrade,cancel_upgrade,get_pending_upgrade.set_notary_public_keyemitsnotary_key_rotatedand keeps a rotation history. Addedget_notary_key_at(ledger)andget_notary_key_history().set_adminreplaced bypropose_admin→accept_admin(nominee must authorize), pluscancel_admin_proposalandget_pending_admin. Breaking change; docs updated.encrypt_commitmentrequires the owner's auth. Also owner auth onrequire_threshold_signaturesand signer auth onadd_threshold_signature.DataKey/ContractErrorentries, shortened event symbols, fixed atomic_swap compile errors.Known gaps
upgradedreportsNoneas the old hash until the first recorded upgrade.Closes #1152
Closes #1153
Closes #1154
Closes #1155