0xB10C / memo

Bitcoin mempool.observer Website
https://mempool.observer/
GNU Affero General Public License v3.0
71 stars 23 forks source link

Feature suggestions for the Bitcoin Transaction Monitor #50

Open conscott opened 4 years ago

conscott commented 4 years ago

I worked on a similar project almost two years ago: https://github.com/conscott/draw_mempool and always told myself I needed to re-implement it for the browser, and it looks like you've done just that :)

Your project has already far exceeded my filter set. As I can see the only extra parts I added were:

  1. Ability to show tx dependencies. As in, which unconfirmed txs are spending other unconfirmed transactions
  2. Highlight transactions that are currently selected for 'getblocktemplate', that is, the transactions that would be mined into the next block if using bitcoin core's algorithm. 
  3. Ability to zoom in and drill down on the transaction graph
  4. Real-time animated option, that totally clobbered the CPU and may not be practical

You don't have to keep this ticket open, I don't expect you to implement, just sharing ideas.

0xB10C commented 4 years ago

Thanks for sharing your ideas @conscott! I didn't know about your draw_mempool project. Very interesting. I'll comment on your ideas below and leave this issue open for a now, if somebody is looking for ideas and my thoughts on it or wants to add something.

  1. Ability to show tx dependencies. As in, which unconfirmed txs are spending other unconfirmed transactions

I've had the idea about having some kind of indication (i.e. arrows) on it as well. That would be really cool and show a lot of insightful relations. I'm definitely not opposed on doing this maybe sometime in the future. Yet, from what I can tell, our architecture differs. I get all transaction data live over the Bitcoin Core ZMQ interface and not over RPC. Every transaction is put into a sorted list and I then query from the tip. I have the full history of all transactions versus you only showing transactions currently in your mempool.

If I'd be to add an identifier of the previous output spend for each input (e.g. the first 16 chars of the txid. [full txid would add a lot of data that is not compressible]) I'd image drawing transaction relation ships would be possible as well.

  1. Highlight transactions that are currently selected for 'getblocktemplate', that is, the transactions that would be mined into the next block if using bitcoin core's algorithm.

I thought about overlaying the last few blocks (Update January 2020: Added in #56 and #58), but having the output of a recent getblocktemplate might even be far more interesting!

  1. Ability to zoom in and drill down on the transaction graph

Agree.

  1. Real-time animated option, that totally clobbered the CPU and may not be practical

I've, somewhat on purpose, designed the site to potentially handle live transactions popping up. I could relay new transactions over a websocket and add draw new ones while translating the canvas a bit to the left. If that is to CPU hungry a separate live view with only the last 2000 transactions could work as well.

0xB10C commented 4 years ago

Another idea I've been thinking about is some kind of snapshot tool. A user selects an area of the plot and the transactions in the selection are dumped (together with the currently selected filters) into a JSON file. A separate site could then be used to display and share the patterns and findings in an interactive way. Preserving the hover tooltip and ability to play around with other filters, which would is lost with a simple screenshot.

I'd imagine it would be possible to use something similar as @mbostock build on top of GitHub gists for other D3 visualizations: bl.ocks.org. For example this gist turns into this visualization.

Ideally have a way to enable comments on it and have the plot embeddable on other sites...

conscott commented 4 years ago

Cool, bl.ocks.org looks great, I had never seen that.

If I get a chance ill try to build this project locally and play with it. I've been meaning to learn go, so maybe this will be this will be the motivation.

It's really cool to see this implemented how I was imagining it. Great work

0xB10C commented 4 years ago

Let me know if you try to set it up locally. I'd like to write down some instructions for this sometime. Trickiest part is probably the customized Bitcoin Core that's needed...