jtgrassie / monero-pool

A Monero mining pool server written in C
BSD 3-Clause "New" or "Revised" License
351 stars 124 forks source link

How to read lmdb database? #59

Closed ghost closed 3 years ago

ghost commented 3 years ago

How to read lmdb database that get addresses, shares and so on?

trasherdk commented 3 years ago

Maybe the included inspect-data tool could be helpful.

jtgrassie commented 3 years ago

The LMDB tables are documented here and as @trasherdk points out, there's also small python script inspect-data.

jasmerah1966 commented 3 years ago

When I use inspect-data tool only -s option (share) return value with many duplicate address there:

2300159 83xxxxxx...FKXxxxxx 2021-02-19 09:42:01
2300159 83xxxxxx...FKXxxxxx 2021-02-19 09:42:00
2300159 83xxxxxx...FKXxxxxx 2021-02-19 09:42:00
2300159 83xxxxxx...FKXxxxxx 2021-02-19 09:41:48
...
2300158 83xxxxxx...FKXxxxxx 2021-02-19 09:41:15
2300158 83xxxxxx...FKXxxxxx 2021-02-19 09:41:10
2300158 83xxxxxx...FKXxxxxx 2021-02-19 09:41:07

the -b option (balance) return no value. Is it normal? Is balance table only filled when pool find its first block?

Note: My pool haven't found a block yet and only me mining on that pool with many PC.

jtgrassie commented 3 years ago

When I use inspect-data tool only -s option (share) return value with many duplicate address there

That should be expected. Every time your worker submits, it adds a share record.

the -b option (balance) return no value. Is it normal? ...Is balance table only filled when pool find its first block?.. My pool haven't found a block yet

There cannot be any balance if you haven't found a block.

trasherdk commented 3 years ago

Diving into src/pool.c pretty much show how to get any kind of information from the database.