feat!: authorized balance decrease/permissionless claims/pinata removal (WARNING! UNSAFE!) - #817
Merged
Conversation
Arjentix
reviewed
Sep 1, 2026
Arjentix
left a comment
Collaborator
There was a problem hiding this comment.
Did a very high-level review, but have some comments for now
agureev
force-pushed
the
artem/namespace-prep
branch
from
September 2, 2026 12:20
62fee87 to
1a83413
Compare
agureev
marked this pull request as ready for review
September 2, 2026 19:23
agureev
requested review from
Arjentix,
jonesmarvin8,
moudyellaz and
schouhy
September 2, 2026 19:26
moudyellaz
approved these changes
Sep 3, 2026
moudyellaz
left a comment
Collaborator
There was a problem hiding this comment.
lgtm, thanks. Left minor comments!
The WARNING says a squatter can "steal whatever balance was initially there", but a_squatter_acquires_a_funded_account_but_still_cannot_spend_it pins the opposite: a debit needs is_authorized, which a squatter cannot forge, so the outcome is a freeze rather than theft. Could you reword to "squat and permanently deny the address, freezing any balance already sitting there"?
Arjentix
approved these changes
Sep 3, 2026
# Conflicts: # Cargo.toml # Justfile # artifacts/lee/privacy_preserving_circuit/privacy_preserving_circuit.bin # artifacts/lez/programs/amm.bin # artifacts/lez/programs/associated_token_account.bin # artifacts/lez/programs/authenticated_transfer.bin # artifacts/lez/programs/bridge.bin # artifacts/lez/programs/bridge_lock.bin # artifacts/lez/programs/clock.bin # artifacts/lez/programs/cross_zone_inbox.bin # artifacts/lez/programs/cross_zone_outbox.bin # artifacts/lez/programs/faucet.bin # artifacts/lez/programs/pinata.bin # artifacts/lez/programs/pinata_token.bin # artifacts/lez/programs/ping_receiver.bin # artifacts/lez/programs/ping_sender.bin # artifacts/lez/programs/sequencer_stake.bin # artifacts/lez/programs/token.bin # artifacts/lez/programs/vault.bin # artifacts/lez/programs/wrapped_token.bin # integration_tests/tests/auth_transfer/public.rs # integration_tests/tests/keys.rs # integration_tests/tests/program_deployment.rs # integration_tests/tests/tps.rs # integration_tests/tests/vault.rs # integration_tests/tests/wallet_ffi.rs # lee/privacy_preserving_circuit/src/execution_state.rs # lee/state_machine/core/src/program/mod.rs # lee/state_machine/src/state/tests/chained_calls.rs # lee/state_machine/src/validated_state_diff/mod.rs # lee/state_machine/test_methods/guest/src/bin/malicious_authorization_changer.rs # lee/state_machine/test_methods/guest/src/bin/malicious_injector.rs # lee/state_machine/test_methods/guest/src/bin/non_delegating_forwarder.rs # lee/state_machine/test_methods/guest/src/bin/private_pda_delegator.rs # lee/state_machine/test_methods/guest/src/bin/selective_pda_delegator.rs # lee/state_machine/test_methods/guest/src/bin/simple_transfer_proxy.rs # lez/indexer/core/src/block_store.rs # lez/programs/Cargo.toml # lez/programs/associated_token_account/src/create.rs # lez/programs/bridge/src/main.rs # lez/programs/faucet/src/main.rs # lez/programs/pinata_token/src/main.rs # lez/programs/sequencer_stake/src/main.rs # lez/programs/src/lib.rs # lez/programs/vault/src/main.rs # lez/sequencer/core/src/lib.rs # test_fixtures/fixtures/prebuilt_sequencer_db.dump # test_programs/guest/src/bin/authority_proxy.rs # test_programs/guest/src/bin/faucet_chain_caller.rs
# Conflicts: # artifacts/lez/programs/pinata.bin # artifacts/lez/programs/pinata_token.bin # artifacts/lez/programs/vault.bin # examples/program_deployment/methods/guest/src/bin/hello_world.rs # examples/program_deployment/methods/guest/src/bin/hello_world_with_authorization.rs # examples/program_deployment/methods/guest/src/bin/hello_world_with_move_function.rs # examples/program_deployment/methods/guest/src/bin/simple_tail_call.rs # examples/program_deployment/methods/guest/src/bin/tail_call_with_pda.rs # lee/privacy_preserving_circuit/src/execution_state.rs # lee/state_machine/core/src/program/mod.rs # lee/state_machine/core/src/program/tests.rs # lee/state_machine/src/lib.rs # lee/state_machine/src/privacy_preserving_transaction/circuit/mod.rs # lee/state_machine/src/program/tests.rs # lee/state_machine/src/state/tests/circuit.rs # lee/state_machine/src/state/tests/claiming.rs # lee/state_machine/src/state/tests/mod.rs # lee/state_machine/src/state/tests/privacy_preserving.rs # lee/state_machine/src/validated_state_diff/mod.rs # lee/state_machine/test_methods/guest/src/bin/asserts_specific_account_authorized.rs # lee/state_machine/test_methods/guest/src/bin/auth_asserting_noop.rs # lee/state_machine/test_methods/guest/src/bin/burner.rs # lee/state_machine/test_methods/guest/src/bin/chain_caller.rs # lee/state_machine/test_methods/guest/src/bin/changer_claimer.rs # lee/state_machine/test_methods/guest/src/bin/data_changer.rs # lee/state_machine/test_methods/guest/src/bin/dropped_account.rs # lee/state_machine/test_methods/guest/src/bin/event_emitter.rs # lee/state_machine/test_methods/guest/src/bin/extra_output.rs # lee/state_machine/test_methods/guest/src/bin/flash_swap_callback.rs # lee/state_machine/test_methods/guest/src/bin/flash_swap_initiator.rs # lee/state_machine/test_methods/guest/src/bin/initialize_then_fund.rs # lee/state_machine/test_methods/guest/src/bin/injects_undeclared_pre_state.rs # lee/state_machine/test_methods/guest/src/bin/malicious_caller_program_id.rs # lee/state_machine/test_methods/guest/src/bin/malicious_self_program_id.rs # lee/state_machine/test_methods/guest/src/bin/minter.rs # lee/state_machine/test_methods/guest/src/bin/missing_output.rs # lee/state_machine/test_methods/guest/src/bin/modified_transfer.rs # lee/state_machine/test_methods/guest/src/bin/non_delegating_forwarder.rs # lee/state_machine/test_methods/guest/src/bin/nonce_changer.rs # lee/state_machine/test_methods/guest/src/bin/noop.rs # lee/state_machine/test_methods/guest/src/bin/pda_claimer.rs # lee/state_machine/test_methods/guest/src/bin/pda_spend_proxy.rs # lee/state_machine/test_methods/guest/src/bin/private_pda_delegator.rs # lee/state_machine/test_methods/guest/src/bin/program_owner_changer.rs # lee/state_machine/test_methods/guest/src/bin/references_undeclared_account.rs # lee/state_machine/test_methods/guest/src/bin/selective_pda_delegator.rs # lee/state_machine/test_methods/guest/src/bin/simple_balance_transfer.rs # lee/state_machine/test_methods/guest/src/bin/simple_transfer_proxy.rs # lee/state_machine/test_methods/guest/src/bin/two_pda_claimer.rs # lee/state_machine/test_methods/guest/src/bin/validity_window.rs # lee/state_machine/test_methods/guest/src/bin/validity_window_chain_caller.rs # lez/programs/amm/src/add.rs # lez/programs/amm/src/new_definition.rs # lez/programs/amm/src/remove.rs # lez/programs/amm/src/swap.rs # lez/programs/amm/src/tests.rs # lez/programs/associated_token_account/src/burn.rs # lez/programs/associated_token_account/src/create.rs # lez/programs/associated_token_account/src/transfer.rs # lez/programs/authenticated_transfer/src/main.rs # lez/programs/bridge/src/main.rs # lez/programs/bridge_lock/src/main.rs # lez/programs/clock/src/main.rs # lez/programs/cross_zone_inbox/src/main.rs # lez/programs/cross_zone_outbox/src/main.rs # lez/programs/faucet/src/main.rs # lez/programs/fee/src/main.rs # lez/programs/pinata/src/main.rs # lez/programs/pinata_token/src/main.rs # lez/programs/ping_receiver/src/main.rs # lez/programs/ping_sender/src/main.rs # lez/programs/sequencer_stake/src/main.rs # lez/programs/token/src/burn.rs # lez/programs/token/src/initialize.rs # lez/programs/token/src/mint.rs # lez/programs/token/src/new_definition.rs # lez/programs/token/src/print_nft.rs # lez/programs/token/src/tests.rs # lez/programs/token/src/transfer.rs # lez/programs/vault/src/main.rs # lez/programs/wrapped_token/src/main.rs # test_programs/guest/src/bin/authority_proxy.rs # test_programs/guest/src/bin/chain_caller.rs # test_programs/guest/src/bin/claimer.rs # test_programs/guest/src/bin/clock_chain_caller.rs # test_programs/guest/src/bin/data_writer.rs # test_programs/guest/src/bin/faucet_chain_caller.rs # test_programs/guest/src/bin/pda_spend_proxy.rs # test_programs/guest/src/bin/pinata_cooldown.rs # test_programs/guest/src/bin/simple_balance_transfer.rs # test_programs/guest/src/bin/time_locked_transfer.rs
# Conflicts: # integration_tests/tests/wallet_ffi.rs # lez/wallet-ffi/src/transfer.rs # lez/wallet-ffi/wallet_ffi.h
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.
🎯 Purpose
This PR serves unites three large-scale issues:
Claiminstructions, making any program that changes its data its owner (if default initially)The PR also changes up the testnet documentation to reflect how the flow now works. However, it is currently in the 0.1 folder. Let me know if that needs changing.
WARNING!
This PR is not safe. It has an inherent rent condition where any default-owned program ID can be claimed by a malicious program. Depending on the circumstance, it can squat and permanently deny the address, freezing any balance already sitting there.
This was agreed-to as an RC-level PR that would allow namespaced account state.
⚙️ Approach
In 1e7aa1f:
In c3a366c:
In 2811d06:
In 7d11e7b
In 3f3d4a0:
In 4e2ecb1:
In 44ab6b1:
In 74a152a:
Rest of the commits are stylistic
🔜 Future Work
Namespaced account state.
📋 PR Completion Checklist