Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store utxo on genesis pool #1270

Merged
merged 37 commits into from
Jan 29, 2024
Merged

Conversation

samuelmanzanera
Copy link
Member

Description

Fixes #1241

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Unit tests
Manual tests:

  • receive few inputs (UCO) from the faucet,
  • analyse the ets table via the observer, to see the list of unspent inputs (3)
  • make some transaction
  • analyse the ets table via the observer, to see the list of unspent inputs (-consumed inputs)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@samuelmanzanera samuelmanzanera added the feature New feature request label Sep 13, 2023
@samuelmanzanera samuelmanzanera changed the base branch from develop to add_consume_inputs_in_tx September 13, 2023 06:45
@samuelmanzanera samuelmanzanera force-pushed the 09-06-store_utxo_on_genesis_pool branch 2 times, most recently from 896df90 to 1e2613f Compare September 13, 2023 06:47
@samuelmanzanera samuelmanzanera marked this pull request as ready for review September 13, 2023 06:51
lib/archethic/account/mem_tables_loader.ex Outdated Show resolved Hide resolved
lib/archethic/account/mem_tables_loader.ex Outdated Show resolved Hide resolved
lib/archethic/account/mem_tables_loader.ex Outdated Show resolved Hide resolved
lib/archethic/p2p/message/replicate_transaction.ex Outdated Show resolved Hide resolved
@samuelmanzanera samuelmanzanera force-pushed the add_consume_inputs_in_tx branch 3 times, most recently from 1346632 to 442604c Compare September 18, 2023 07:59
Base automatically changed from add_consume_inputs_in_tx to AEIP-21 September 19, 2023 09:00
@Neylix Neylix marked this pull request as draft December 22, 2023 12:46
@samuelmanzanera samuelmanzanera marked this pull request as ready for review January 2, 2024 09:14
lib/archethic/utxo/memory_ledger.ex Outdated Show resolved Hide resolved
lib/archethic/utxo.ex Outdated Show resolved Hide resolved
lib/archethic/utxo.ex Show resolved Hide resolved
lib/archethic/utxo.ex Outdated Show resolved Hide resolved
lib/archethic/p2p/message/get_unspent_outputs.ex Outdated Show resolved Hide resolved
lib/archethic/p2p/message/replicate_transaction.ex Outdated Show resolved Hide resolved
lib/archethic/replication/transaction_context.ex Outdated Show resolved Hide resolved
lib/archethic/transaction_chain.ex Outdated Show resolved Hide resolved
lib/archethic/transaction_chain/transaction_input.ex Outdated Show resolved Hide resolved
@samuelmanzanera samuelmanzanera force-pushed the 09-06-store_utxo_on_genesis_pool branch 3 times, most recently from 32674d0 to 587ea7f Compare January 11, 2024 08:06
@samuelmanzanera samuelmanzanera marked this pull request as draft January 15, 2024 10:23
@samuelmanzanera samuelmanzanera marked this pull request as ready for review January 16, 2024 13:06
lib/archethic/utxo/memory_ledger.ex Outdated Show resolved Hide resolved
lib/archethic/utxo.ex Outdated Show resolved Hide resolved
lib/archethic/utxo/loader.ex Outdated Show resolved Hide resolved
lib/archethic/utxo/loader.ex Outdated Show resolved Hide resolved
lib/archethic/utxo/memory_ledger.ex Outdated Show resolved Hide resolved
@@ -20,7 +20,7 @@
"dart_sass": {:hex, :dart_sass, "0.5.1", "d45f20a8e324313689fb83287d4702352793ce8c9644bc254155d12656ade8b6", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "24f8a1c67e8b5267c51a33cbe6c0b5ebf12c2c83ace88b5ac04947d676b4ec81"},
"decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"},
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
"dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"},
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could update the minimum version requirement in mix.exs as well

lib/archethic/utxo.ex Outdated Show resolved Hide resolved
@Neylix Neylix added the AEIP label Jan 18, 2024
lib/archethic/utxo.ex Outdated Show resolved Hide resolved
@samuelmanzanera samuelmanzanera merged commit 7cb0ea8 into AEIP-21 Jan 29, 2024
1 check passed
@samuelmanzanera samuelmanzanera deleted the 09-06-store_utxo_on_genesis_pool branch January 29, 2024 14:40
Neylix pushed a commit that referenced this pull request Feb 12, 2024
* Ingest inputs in the genesis pool
* Ensure genesis address lookup before to ingest inputs
* Add state in transaction's input
* Add DB.filepath method
* Add state and call consumed inputs
* Fix unspent outputs for state/call + refactor
* Add memory size limit for utxo ledger
* Add concurrent resolve genesis address
* State serialization for TransactionInput
* Simplify LedgerOperations.consume_inputs API
* up protocol version
* Aggregate and reward during ingestion for tx before protocol version n°5
Neylix pushed a commit that referenced this pull request Feb 21, 2024
* Ingest inputs in the genesis pool
* Ensure genesis address lookup before to ingest inputs
* Add state in transaction's input
* Add DB.filepath method
* Add state and call consumed inputs
* Fix unspent outputs for state/call + refactor
* Add memory size limit for utxo ledger
* Add concurrent resolve genesis address
* State serialization for TransactionInput
* Simplify LedgerOperations.consume_inputs API
* up protocol version
* Aggregate and reward during ingestion for tx before protocol version n°5
Neylix pushed a commit that referenced this pull request Feb 21, 2024
* Ingest inputs in the genesis pool
* Ensure genesis address lookup before to ingest inputs
* Add state in transaction's input
* Add DB.filepath method
* Add state and call consumed inputs
* Fix unspent outputs for state/call + refactor
* Add memory size limit for utxo ledger
* Add concurrent resolve genesis address
* State serialization for TransactionInput
* Simplify LedgerOperations.consume_inputs API
* up protocol version
* Aggregate and reward during ingestion for tx before protocol version n°5
samuelmanzanera added a commit that referenced this pull request Feb 21, 2024
* Ingest inputs in the genesis pool
* Ensure genesis address lookup before to ingest inputs
* Add state in transaction's input
* Add DB.filepath method
* Add state and call consumed inputs
* Fix unspent outputs for state/call + refactor
* Add memory size limit for utxo ledger
* Add concurrent resolve genesis address
* State serialization for TransactionInput
* Simplify LedgerOperations.consume_inputs API
* up protocol version
* Aggregate and reward during ingestion for tx before protocol version n°5
Neylix pushed a commit that referenced this pull request Mar 6, 2024
* Ingest inputs in the genesis pool
* Ensure genesis address lookup before to ingest inputs
* Add state in transaction's input
* Add DB.filepath method
* Add state and call consumed inputs
* Fix unspent outputs for state/call + refactor
* Add memory size limit for utxo ledger
* Add concurrent resolve genesis address
* State serialization for TransactionInput
* Simplify LedgerOperations.consume_inputs API
* up protocol version
* Aggregate and reward during ingestion for tx before protocol version n°5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AEIP feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AEIP-21: Store utxo on genesis pool
2 participants