archethic-foundation / archethic-foundation/archethic-node

Refactor VersionedUnspentOutput / Inputs

Open
#1,449 0 comments 0 reactions 0 assignees View on GitHub
enhancements good first issue quality
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem?

Currently the structs `VersionedUnspentOutput` contains the unspent output and the protocol version:
```elixir
%VersionedUnspentOutput{
protocol_version: v,
unspent_output: %UnspentOutput{]}
}
```
But this is makes the code more complex to write and understand

### Describe the solution you'd like

It could be more easy to keep the `UnspentOutput` struct and add the protocol version in it directly.

### Additional context

_No response_

### Epic

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the VersionedUnspentOutput, UnspentOutput, and corresponding input struct definitions and all their usages. Trace how the protocol version is read and passed through the code, then update the affected callers consistently; the refactor is complete when the separate versioned wrappers are no longer needed and the existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.