archethic-foundation / archethic-node

Official Archethic Blockchain node, written in Elixir
GNU Affero General Public License v3.0
75 stars 22 forks source link

Improve DB field name #1565

Open Neylix opened 1 month ago

Neylix commented 1 month ago

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