Skip to content

Conversation

@amalcaraz
Copy link
Collaborator

Now any user can pin or upload STORE files on Aleph network without having tokens hold, and this thing also applies on programs, as anyone can create a program without having tokens hold.

We need to enable the balance check on Pyaleph on creation moment for programs, and add the check on the garbage collector and on the pin/upload action for STORE messages.

This should only apply for new PROGRAM or STORE messages, so we can use the release block height or date to take into account for that check.

Self proofreading checklist

  • Is my code clear enough and well documented
  • Are my files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • Database migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Changes

  • Store and ephemeral program messages now take into account the free and locked account token balance before being processed

How to test

  • Try to upload/pin a volume with a low/empty balance account and check that an error is raised
  • Try to set up an ephemeral program with a low/empty balance account and check that an error is raised

Notes

  • STORE_AND_PROGRAM_COST_DEADLINE_HEIGHT and STORE_AND_PROGRAM_COST_DEADLINE_TIMESTAMP variables are open to be defined with a different value depending on the release date

@amalcaraz amalcaraz self-assigned this Mar 17, 2025
@amalcaraz amalcaraz marked this pull request as ready for review March 20, 2025 14:30
@amalcaraz amalcaraz force-pushed the angel-balance_check_store_and_program_messages branch from 4a77a84 to 2f68e6f Compare April 22, 2025 10:29
@amalcaraz amalcaraz requested a review from nesitor April 22, 2025 10:29
@nesitor nesitor merged commit 32ddc10 into main Apr 22, 2025
5 checks passed
@nesitor nesitor deleted the angel-balance_check_store_and_program_messages branch April 22, 2025 14:56
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.

3 participants