Revert "refactor(permission): enable direct function calls via executeWithSig
(#121)"
#133
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.
Description
This PR reverts the changes introduced in #121, restoring the use of the permission-setting approach that allows periphery contracts to call protocol core functions on behalf of IP owners. Additionally, it reverts the changes from #128 and #123, which will be reimplemented in the next PR.
Reasons for Reverting the Changes
Scalability Concerns with
executeWithSig
After offline discussions, we determined that while
executeWithSig
offers better security guarantees, it does not scale well with the addition of new core protocol functionalities. Specifically, each protocol interaction requires a user signature, which rapidly increases the stack size of periphery functions and renders them unusable.Conversely, the previous permission-setting method does not introduce security risks when proper guardrails are in place. This approach can be further optimized by using
setBatchPermission
, which reduces the required signatures to a single batch. This simplification greatly improves developer experience and scalability for periphery functions.Reimplementation of Changes from # 128 and # 123
Changes introduced in feat(licensing): enable multi-license attachment #128 and feat(licensing): support custom license templates and decouple terms registration from attachment #123 were designed around the
executeWithSig
model, leading to functionality compromises. For instance, the ability to register PIL terms and immediately attach them to IPs was removed becauseexecuteWithSig
required predicting the new license term ID to generate appropriate signatures.By reverting refactor(workflows): replace permission setting with
executeWithSig
#121, these limitations no longer apply, enabling us to reintroduce these functionalities without compromises in the next PR.Additional Changes
protocol-core
main branch to address compilation issues caused by import changes from protocol-core PR #291:Related Issues