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

Block explorer (tinyscan) #19

Merged
merged 28 commits into from
Aug 6, 2024
Merged

Block explorer (tinyscan) #19

merged 28 commits into from
Aug 6, 2024

Conversation

liamzebedee
Copy link
Collaborator

@liamzebedee liamzebedee commented Jul 29, 2024

I built a really simple block explorer for tinychain, gonna call it tinyscan.

Tinyscan is basically a Golang web server, using the built-in go templating engine, that minimally relies on the BlockDAG and StateMachine types to provide a basic view into the blockchain.

It doesn't require any custom RPC, it just uses the SQLite database.

To run:

cd cli/
go run tinychaind.go explorer --db ../build/node1.db

# In production.
tinychain explorer --db ./node1.db

Screenshots.

Screenshot 2024-07-31 at 8 14 07 am
Screenshot 2024-07-31 at 8 14 10 am
Screenshot 2024-07-31 at 8 14 14 am
Screenshot 2024-07-31 at 8 14 17 am
Screenshot 2024-07-31 at 8 14 20 am

Bugs.

  • It appears like we're missing some state being processed? ie. http://0.0.0.0:9000/transactions/5fa1c5ae3e7dfcf29d9f73db92004558b81de5f4b3660467e8a1aa8f32c8b46c this transaction which was manually sent by brian is not coming up with any balance for the to account. Not showing up in the ledger table either.

    Added "confirmed in" functionality. Turns out this tx was just reorged out.

  • GetLongestChainHashList hasn't been updated to track the full tip vs. headers tip distinction. As such, the latest block is not found in the /blocks/ index of the longest hash chain.

@liamzebedee
Copy link
Collaborator Author

liamzebedee commented Jul 29, 2024

.

@liamzebedee liamzebedee mentioned this pull request Jul 30, 2024
37 tasks
@liamzebedee liamzebedee merged commit 6968efb into main Aug 6, 2024
6 checks passed
@liamzebedee liamzebedee deleted the explorer branch August 6, 2024 08:54
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.

1 participant