Skip to content

fix(standards): bound transfer policy dispatch to the reference block - #3748

Open
onurinanc wants to merge 6 commits into
nextfrom
fix-apply-expiration-transfer-callbacks
Open

fix(standards): bound transfer policy dispatch to the reference block#3748
onurinanc wants to merge 6 commits into
nextfrom
fix-apply-expiration-transfer-callbacks

Conversation

@onurinanc

Copy link
Copy Markdown
Collaborator

Summary

  • Apply the default expiration limit in invoke_transfer_policy, before the pause check, so the pause flag and every active policy are bounded to the reference block.
  • Document the limit on invoke_send_policy, invoke_receive_policy, TransferAllowAll and TokenPolicyManager.

Closes #3744.

@partylikeits1983

Copy link
Copy Markdown
Contributor

Was this not addressed already here? #3512

@onurinanc

Copy link
Copy Markdown
Collaborator Author

@partylikeits1983

After #3512 is merged I believe the following are still left:

  • The active policy root itself is read by the dispatcher before the dispatch happens, which means that switching from an allow_all policy to a more restrictive policy could be indefinitely bypassed by anchoring to a reference block that existed before the switch.
  • The pause flag is read by the dispatcher rather than by the policy itself, so it was only incidentally limited whenever the active policy happened to set its own limit
  • Policy roots that were registered using TransferPolicy::custom were not enforced
  • An active TransferAllowAll policy does not set any expiration date, and the dispatcher does not set one either, which is why these transfers remained unbounded and limitless.

So, I've done this updates to fully close #3744

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.

H-04: Transfer Policy Enforcement Reads Faucet State From Prover-Chosen Historical Reference Blocks

2 participants