MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 529 forks source link

(add docs for how to configure to avoid) Issues recovering pre-computed blocks from logs as truncated due to length #8156

Open garethtdavies opened 3 years ago

garethtdavies commented 3 years ago

In attempting to recover some missing archive blocks from my logging service (Loki) I noticed that some precomputed blocks were being truncated. It appears this is due to size. If the size of these log messages is expected then likely there needs to be a warning to that effect to ensure users are capturing the full log message.

This only appears to be an issue on some logs. Take these two:

Worked, and imported: https://gist.github.com/garethtdavies/d7bb391c1f52bcff556402362fbbff87

This one was truncated: https://gist.github.com/garethtdavies/525a2d5ebd523e092bbf77798658fbd8

Looking at the local logs the log for a pre-computed block that has issues is 6MB in size. precomputed-log-line.txt.zip.

garethtdavies commented 3 years ago

I'm also seeing this on the Gcloud uploads - is a 4.5MB pre-computed block considered normal?

image

mrmr1993 commented 3 years ago

This probably has to do with storing the snark work in the block logs. For that particular block there are 128 of them.

garethtdavies commented 3 years ago

Ah, that makes sense. I was thinking this was more like the extensional format and only stored the data required by the archive node. Given an active chain, it seems this logging will be significant at circa 5MB per block

garethtdavies commented 3 years ago

Maybe related to https://github.com/MinaProtocol/mina/issues/7380

aneesharaines commented 3 years ago

Need to add docs on how you should configure the logging to support this

aneesharaines commented 3 years ago

@bkase to provide a write up on how to write to a path instead of the std out

mrmr1993 commented 3 years ago

@bkase --precomputed-blocks-file is the flag I was talking about.