Closed matthewdarwin closed 2 years ago
Some code have been merged into the develop branch of sf-ethereum
and now that branch is unstable...
The following flags should have been remove from the merger cmd.
start-block
end-block
merger-minimal-block-num
merger-max-fixable-fork
merger-batch-mode
merger-next-exclusive-highest-block-limit
should have been added
Merger is no more supporting batch mode since merge files that need to be reprocessed should be generated be the mindreader
We are currently working to fix this situation. Some other components like mindreader
relayer
fireshose
are also impacted.
Hi, here's a bit of reading on the mechanism of the merger:
merger wants to figure out the next bundle to merge (either from the state file, or by scanning existing merged bundles)
merger reads the last few merged files to "prepopulate its knowledge of the current chain"
merger polls the new one-block-files (its usual job) -> files below Last Irreversible Block and below last merged bundle will be deleted -> files above Last Irreversible Block but not merged already will be included in next bundle -> files that fit inside the next bundle will be merged once a complete canonical chain can be linked from LIB to the highest block
merger also scans to see if the bundle it wants to create is already present, in which case it loads it (skips bundle production) and continues on to the next
^ this is not a wanted scenario...
If you want to start the merger anyway to start producing merged bundles at block 1400, do the following: a) ensure that you have a mindreader producing block 1400 and the following b) delete any one-block-file that is below 1400 (to prevent them being put in the next bundle...) c) start the merger with the flag --merger-next-exclusive-highest-block-limit=1500 (remove that flag next time, the state file will be sufficient to continue)
Then, the merger will produce the merged files 1400, 1500, etc.
Note that you will need to create the missing merged files (100, 300, 400, etc.) using the mindreader directly with the appropriate flags, don't use the merger for that purpose.
I will write a small procedure for you to fix those holes tomorrow.
In my case, using the old merger merged all the files, so I don't have any holes now. Now if all the merged blocks are correct, I don't know.
When filling in old blocks, I don't like running mindreader in auto-merge mode because if the mindreader process exits, then I end up with a hole because it can't create a full block bundle.
ok, then make sure that you write those 1-block-files somewhere else than where your real merger is running :) This being said, and the new behavior being written here, do we still need this issue ?
With the latest mindreader with the merger code embedded in it, I got a hole in the local one-block files. I sent the logs to Matthieu
I believe this is unrelated to the issue ->
Mar 8 11:13:09 goerli (codec) mindreader block stats {"block_num": 6014239, "duration": 19020325, "stats": {"add_log":11,"balance_change":14,"begin_apply_trx":5,"code_change":6,"created_account":6,"end_apply_trx":5,"evm_end_call":51,"evm_keccak":48,"evm_param":51,"evm_run_call":51,"finalize_block":1,"gas_change":196,"gas_event":92,"nonce_change":16,"storage_change":50,"suicide_change":1,"trx_from":5}}
Mar 8 11:13:09 goerli (mindreader) got one block {"block_num": 6014239}
Mar 8 11:13:09 goerli (mindreader) waiting to consume next block
Mar 8 11:13:09 goerli (mindreader) waiting to consume next block
Mar 8 11:13:09 goerli (codec) mindreader block stats {"block_num": 6014242, "duration": 1606321, "stats": {"add_log":6,"balance_change":9,"begin_apply_trx":3,"end_apply_trx":3,"evm_end_call":10,"evm_keccak":40,"evm_param":10,"evm_run_call":10,"finalize_block":1,"gas_change":34,"gas_event":14,"nonce_change":3,"storage_change":13,"trx_from":3}}
the mindreader completely skipped producing this block. Maybe the deep-mind patch has an issue with these specific blocks in Görli ? We are not indexing this testnet so we are not aware of any issue..
could you bring your görli node up to block 6014238 (or below), then start it with --mindreader-node-debug-deep-mind
up to block 6014242 (or above) ?
It will produce lots of logs but may give us an insight on what happened, and if those blocks are completely unprocessable with the current deepmind/mindreader combination ?
(Also, since this is unrelated, would you mind if I close this issue and open a new one for this ?)
stale issue, if the deepmind+mindreader skips some things in görli, it is unrelated to merger.
binaries built before Dec 5 do not have this problem.
I have a BSC setup where mindreaders are generating one-blocks and merger is merging them. There are lots (10000+) blocks piled up to be merged, but there is a section where there are no merged blocks and no one-blocks. So merger should be waiting for the mindreader to generate those blocks.
The following ranges of merged blocks are not available: 12890800 => 12899900 (92); 12900000 => 12964100 We're waiting for mindreader to generate one-block files for 12890800 and on. So merger should be stuck waiting for those files to appear.
This is how it looks on a binary built before Dec 5, all ok.
On latest built, it skips over this hole and is is looking at block 13173400
No end of playing with merger-start-block-num will make the latest merger work properly. /var/lib/dfuse/merger/merger.seen.gob was removed as well.
Working config with the old binary: