archethic-foundation / archethic-foundation/archethic-node

Smart Contracts: validate_recipients should validate more things

Open
#1,070 3 comments 0 reactions 0 assignees View on GitHub
smart contracts
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

I used to think that as long as the contract execute and the transaction's condition pass, we should accept the trigger transaction.

But since the users actually send assets to the contract, the contract must work. Otherwise the assets are lost. So we pretty much need to validate everything that is done during the validation of a transaction during the validation of the recipients.

Such as:

- validate if sufficient funds
- validate inherit's condition as well
- validate transaction's size

Contributor guide

Open the contributing guide

Research direction

Start at the validate_recipients entry point and compare it with the existing transaction validation flow. Check how sufficient funds, inherited conditions, and transaction size are validated, then confirm recipient validation covers the required checks without accepting transactions that could lose assets.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.