lbrycrd icon indicating copy to clipboard operation
lbrycrd copied to clipboard

make it easier to test with mainnet data

Open BrannonKing opened this issue 5 years ago • 5 comments

Includes:

  1. Running the daemon in "regtest" mode but using mainnet data.

...

BrannonKing avatar Aug 09 '18 16:08 BrannonKing

I considered three different approaches for this:

  1. Pass in an additional (with -regtest) command-line parameter that copies over the current "mainnet" saved data wholesale.
  2. Make a separate "devtools" script to do #1.
  3. Make an RPC command to transfer in x number of blocks from the mainnet or testnet saved data.

I'm planning on #3. It seems to be the most flexible although it's a bit more work. Things that I think we should not do: make the regtest mode connect to any network, allow simultaneous file access. (All three options require that the data being copied is not presently in use.)

BrannonKing avatar Aug 13 '18 22:08 BrannonKing

Have you looked at approaches taken by others? Seems like something to have come up for bitcoin, though I did google briefly to no success.

kauffj avatar Aug 14 '18 13:08 kauffj

After the question, I did look around for other approaches but found nothing. After attempting to write the copy in C++ land, I gave up as I was unable to update the address prefix bytes on incoming data without destroying all the hashes -- essentially making it useless. I ended up with the script approach for the transfer.

BrannonKing avatar Aug 27 '18 21:08 BrannonKing

From earlier conversations it sounded like copying over all the supports was less necessary; this was more about easily testing memory usage given a large number of claims. The proposed scripts don't add any supports.

BrannonKing avatar Aug 27 '18 21:08 BrannonKing

If we import the data (claim names & values & supports), but it's all tied to the same user (with millions of addresses) -- is there any value in that?

BrannonKing avatar Sep 06 '19 22:09 BrannonKing