Skip to content

Fix ownership of shared secret variables#492

Open
lydiagarms wants to merge 2 commits into
masterfrom
lyd/sharedSecretOwnershipFix
Open

Fix ownership of shared secret variables#492
lydiagarms wants to merge 2 commits into
masterfrom
lyd/sharedSecretOwnershipFix

Conversation

@lydiagarms
Copy link
Copy Markdown
Collaborator

@lydiagarms lydiagarms commented Jun 2, 2026

Summary

Fixes #472. This PR fixes a bug, where for shared secret variables that are modified in a function where there is a require statement such as require(msg.sender == admin), the ownership of the variable is assigned to the admin. This means the new commitment will be created under the admins public key and not the sharedPublicKey, which is what we want by default.

Checklist

  • Tests added/updated
  • CI passes
  • No secrets/keys committed
  • Docs updated (if needed)
  • Backwards compatible (or noted breaking change)

How to test

  1. Test with Swap.zol where startSwap can only be called by an admin,

…t also fix the owner via the require statement, the sharedPublicKey is used for new commitments
@lydiagarms lydiagarms requested review from SwatiEY and Wei-257 June 4, 2026 15:17
@lydiagarms lydiagarms changed the title fix(orchestration): ensure that for functions with shared secrets tha… Fix ownership of shared secret variables Jun 4, 2026
@lydiagarms lydiagarms marked this pull request as ready for review June 4, 2026 15:22
@lydiagarms lydiagarms force-pushed the lyd/sharedSecretOwnershipFix branch from e9bab87 to 2b79ede Compare June 5, 2026 14:02
@lydiagarms lydiagarms force-pushed the lyd/sharedSecretOwnershipFix branch from 2b79ede to 36b304c Compare June 5, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ownership of shared address variables

1 participant