Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(world): prevent misconfigured delegations, allow unregistering [L-04] #2096

Merged
merged 11 commits into from
Jan 17, 2024

Conversation

yonadaa
Copy link
Contributor

@yonadaa yonadaa commented Jan 9, 2024

Currently, we allow clearing delegations by passing empty calldata. However this could cause invalid delegations, so this PR performs full validation regardless of whether initCallData is empty.

Delegations can now be explicitly unregistered by calling unregisterDelegation.

@yonadaa yonadaa requested review from alvrs and holic as code owners January 9, 2024 14:19
Copy link

changeset-bot bot commented Jan 9, 2024

🦋 Changeset detected

Latest commit: 4b2f271

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@latticexyz/world Patch
@latticexyz/cli Patch
@latticexyz/dev-tools Patch
@latticexyz/store-sync Patch
@latticexyz/world-modules Patch
@latticexyz/store-indexer Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/ecs-browser Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/network Patch
@latticexyz/noise Patch
@latticexyz/phaserx Patch
@latticexyz/protocol-parser Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/services Patch
@latticexyz/solecs Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/std-client Patch
@latticexyz/std-contracts Patch
@latticexyz/store-cache Patch
@latticexyz/store Patch
@latticexyz/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yonadaa yonadaa marked this pull request as draft January 9, 2024 14:19
@yonadaa yonadaa changed the title fix(world): prevent misconfigured delegations, allow unregistering fix(world): prevent misconfigured delegations, allow unregistering [L-04] Jan 9, 2024
@yonadaa yonadaa marked this pull request as ready for review January 11, 2024 14:19
@yonadaa
Copy link
Contributor Author

yonadaa commented Jan 11, 2024

This PR is failing integration tests because CoreSystem is too big to deploy. This should be fixed in #2046.

holic
holic previously approved these changes Jan 17, 2024
@holic
Copy link
Member

holic commented Jan 17, 2024

Can we add a test while we're here, just to make sure we can unregister a delegation via the world?

@yonadaa
Copy link
Contributor Author

yonadaa commented Jan 17, 2024

Added a test that you can unregister a delegation, then the call fails

@yonadaa yonadaa merged commit e4a6189 into main Jan 17, 2024
11 checks passed
@yonadaa yonadaa deleted the yonadaaa/delegation-misconfigured branch January 17, 2024 16:48
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.

2 participants