dogecoinfoundation / gigawallet

GigaWallet is the backend for your Dogecoin Business.
https://gigawallet.dogecoin.org
MIT License
56 stars 11 forks source link

Decode `getblock` hex from Core (faster block decoding) #132

Closed raffecat closed 7 months ago

raffecat commented 8 months ago

Now decodes Block HEX instead of using getrawtransaction from Core. No longer fetches individual transactions from core.

Now fetches Block HEX from core and decodes the blocks using doge.DecodeBlock and doge.ClassifyScript in Gigawallet.

As a result, no longer needs txindex enabled in core config.

Gigawallet is much faster to process blocks.

raffecat commented 8 months ago

Experimental… needs some real-world testing :) The block-decode tests pass, the script-classify tests pass.

It was also tested against thousands of blocks using verifyDecodedBlock to fetch all the individual transactions from core as we did before, and compare the results (no errors were found)

tjstebbing commented 8 months ago

A good test would be reindexing giga from origin?

qlpqlp commented 8 months ago

I will test and reindex tomorrow and will track the time of it using my home node 🙂

georgeartem commented 8 months ago

That's pretty cool, does that mean we can run pruned nodes if we want?

On Mon, Feb 19, 2024 at 10:14 AM Paulo Vidal @.***> wrote:

@.**** approved this pull request.

Seems really wonderful :D

— Reply to this email directly, view it on GitHub https://github.com/dogecoinfoundation/gigawallet/pull/132#pullrequestreview-1888983213, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZSY44KONQEHF3VJY434H3YUOI6VAVCNFSM6AAAAABDNZGHSSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQOBYHE4DGMRRGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

raffecat commented 8 months ago

@georgeartem Yes, you can use a pruned node as long as Gigawallet has already processed the pruned blocks (typically a new install will start -100 blocks from Tip and sync from there - Giga doesn't validate blocks, it 100% trusts the Core Node to do that part)