archethic-foundation / archethic-foundation/archethic-node

Smart Contracts: avoid executing the contract many times

Open
#920 2 comments 0 reactions 0 assignees View on GitHub
feature smart contracts to-analyze
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Describe the problem you discovered

Right now, the Smart Contract is run once by a miner (A).
If that miner (A) crashes or the execution did not create a new transaction, the next elected node (B) will react and execute the contract. If B's execution also result in a crash or no new transaction, the next elected node (C) will react an so on.

We need a way to avoid that behaviour.

### Describe the solution you'd like

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Smart Contract execution path from miner A through the next elected nodes B and C. Determine how crashes or executions that create no new transaction trigger retries, then define completion as preventing the same contract from executing repeatedly while preserving the intended transaction outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.