Skip to content

Dev fetch utxos#238

Merged
henriqueaklein merged 22 commits intodevelopfrom
dev_fetch_utxos
Mar 5, 2026
Merged

Dev fetch utxos#238
henriqueaklein merged 22 commits intodevelopfrom
dev_fetch_utxos

Conversation

@henriqueaklein
Copy link
Contributor

The current state of the develop branch fails on already initialized databases that have UTXOs, because the parsing is not done in all transactions and the nonce grabbing checks if the transaction is in the in-memory structure, which not all of them will be. So these changes were implemented:

  • InitNonce removed and replaced with InitTransactions:
    • Doesn't check on nonces from the network and instead check if we have all the UTXOs we need to start transactioning
    • Relies on local UTXOs. If no local UTXOs found, it's gonna request from the network.
    • An improvement should be to fetch the UTXOs form the network regardless and try to see which one is more updated.
  • Request UTXOs on pubsub
    • Pubsub messages that request a list of UTXOs from other peers.
    • If we are outdated, we could grab the most trusted information from other peers (taking into account validators and soft consensus)
    • Done on initialization instead of requesting for nonces.
  • Request Transactions on pubsub
    • We can request a transaction by hash on pubsub.
    • The grabbing of the content is still done by graphsync.
    • This is means to avoid having to go through all the CRDT graph (although this wasn't removed yet)
    • In order to allow this, CID info is being stored on local rocksdb as a look up table for transactions.
  • Nonces stores in rocksdb.
    • With not all transactions being parsed anymore we need the latest nonce stored somewhere.
    • We record the confirmed nonce peers we receive data from to avoid re-parsing everything.

@henriqueaklein henriqueaklein requested a review from EduMenges March 5, 2026 13:43
@henriqueaklein henriqueaklein marked this pull request as ready for review March 5, 2026 13:43
@henriqueaklein henriqueaklein requested a review from EduMenges March 5, 2026 16:44
@henriqueaklein henriqueaklein merged commit 5f401e0 into develop Mar 5, 2026
@henriqueaklein henriqueaklein deleted the dev_fetch_utxos branch March 5, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants