archethic-foundation / archethic-foundation/archethic-node

Improve DB field name

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

Description

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

Transaction in DB is stored with all field indexed by there name. This allow to read a transaction from DB only with the needed fields.
But currently those fields are simply named using string like "validation_stamp.ledger_operations.transaction_movements".
This is easier to read, but it takes a lot of space. Only the field names represent 575 bytes, and for 1M transaction it represent 548 Mo only for field name indexation.

### Describe the solution you'd like

We could create a map to link field name with an integer, and write this integer in the file instead of the full field name. This would greatly reduce the size of a stored transaction

### Additional context

_No response_

### Epic

_No response_

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the transaction database storage and field-indexing code, then assess how field names are persisted and read. Done means a compatible integer mapping reduces stored field-name space without preventing reads of selected transaction fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain, databases
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.