Skip to content

Fix/psy precompiles - #4

Open
logere wants to merge 7 commits into
mainnet-betafrom
fix/psy-precompiles
Open

logere wants to merge 7 commits into
mainnet-betafrom
fix/psy-precompiles

Conversation

@logere

@logere logere commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Track each account's settled rewards and credit only the delta from the
cumulative total, preventing double-counting when claiming multiple
times. Applied to both token and usdt_token contracts.
Assert caller is the deployer in simple_mint to prevent unauthorized
minting of USDT.
Drop the pow rewards claim path from the usdt_token precompile along
with its mining_rewards dependency and precompiles.json entry. The
storage fields are kept as reserved slots to preserve the deployed
storage layout.
Require index < 2^proof_height instead of the fixed 2^32 limit, making
the leaf-index range check explicit and fail-fast for the actual tree
height.
…fer events in batch transfers

- token/usdt_token: assert the upper u32 limbs stay within Felt range
  when decoding a hash to an amount
- usdt_token: emit TransferEvent for each non-zero transfer in
  batch_simple_transfer_2/5
…reads

Replace the 256-iteration lookup loops in get_chain_count_value and
get_chain_root_value with direct dynamic index access in both
deposit_tree and withdrawal_tree. Behavior is unchanged.
Add a PrivateTransferEvent to the token and usdt_token precompiles that
emits the note index, commitment, and new note root after a private
transfer updates the note tree. Receiver, value, and note_commitment are
deliberately excluded to avoid leaking private or linkable data.
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.

1 participant