monero-project / monero-site

https://getmonero.org
BSD 3-Clause "New" or "Revised" License
287 stars 392 forks source link

Enhanced P2Pool Block Found banner #2353

Closed NadimGhaznavi closed 3 months ago

NadimGhaznavi commented 3 months ago

Yeah, I know, it's P2Pool, not monerod. But still!!!!

I have written a Python application that monitors the P2Pool daemon log and extracts "block found", "share found" and "XMR payout" events and loads them into MongoDb. I have a front end today that displays my Wallet transactions, per day, and graphs them using JavaScript's ApexCharts. My next step is to replace that manual process of exporting the wallet transactions into daily payouts in CSV format and pushing it to my GitHub pages site. Instead I'd like the P2Pool.monitor_p2pool_log() function to call the appropriate classes to do those steps for me. So I'll have a real-time dashboard showing the XMR earnings over time.

In the spirit of P2Pool's "BLOCK FOUND" banner, my app has the following output.

dan@sally:~$ db4e.py -a monitor_p2pool_log
Monitoring log file (/opt/prod/db4e/logs/p2pool.log)
-- SHARE FOUND EVENT ----------------------
   Miner: phoebe
   Effort: 8.84
   Difficulty: 106617560
   IP address: 192.168.1.8
   Timestamp: 2024-08-19 06:43:19.680700
-- XMR TRANSACTION FOUND ------------------
   _________     _______   ____      ____   _______    ____   ____   __________   
  |   __    \   /       \ |   \\    /   ||/       \\  |   |\ |   \\/          \\ 
  |   || \   \ /   /\    \\    \\  /   ///   //\   \\ |   || |   ||\___    ___// 
  |   ||_/   ||   ||_|   ||\    \\/   ///   //  \   \\|   || |   ||    |   ||      
  |         /||          || \        // |  ||    |  |||   || |   ||    |   ||      
  |   _____|/ |   ____   ||  \_     //  \   \\  /   //|   || |   ||    |   ||      
  |   ||      |   || |   ||   /    //    \   \\/   // |   ||_|   ||    |   ||      
  |___|/      |___|| | __|/  |____//      \_______//   \_________//    |___|/      

   Wallet       : 48xZ...
   Amount       : 0.000538612872
   Block number : 3217638
   Timestamp    : 2024-08-18 05:14:57.777500
plowsof commented 3 months ago

https://github.com/SCheBSXrnykh/p2pool