* Improve the correctness of Eth's trace_block
- Improve encoding/decoding of parameters and return values:
- Encode "native" parameters and return values with Solidity ABI.
- Correctly decode parameters to "create" calls.
- Use the correct (ish) output for "create" calls.
- Handle all forms of "create".
- Make robust with respect to reverts:
- Use the actor ID/address from the trace instead of looking it up in
the state-tree (may not exist in the state-tree due to a revert).
- Gracefully handle failed actor/contract creation.
- Improve performance:
- We avoid looking anything up in the state-tree when translating the
trace, which should significantly improve performance.
- Improve code readability:
- Remove all "backtracking" logic.
- Use an "environment" struct to store temporary state instead of
attaching it to the trace.
- Fix random bugs:
- Fix an allocation bug in the "address" logic (need to set the
capacity before modifying the slice).
- Improved error checking/handling.
- Use correct types for `trace_block` action/results (create, call, etc.).
- And use the correct types for Result/Action structs instead of reusing the same "Call" action every time.
- Improve error messages.
We did this to avoid using cached migrations in the borked watermelon
upgrade on calibrationnet, but we don't need to keep this in the
code (even for users syncing from scratch).
the .gz files are impossible to rebase/merge/etc. but the files are needed in
the repo for `go build` because they are embeds; so we just don't gzip them
This will re-execute tipsets to forcibly re-compute and store events
when they're missing. This is effectively lazy backfilling of events.
NOTE: This _won't_ backfill the index itself, it'll just give us the
events.
fixes#11335
* chore: cleanup sync serve and reduce log noise
1. Demote a noisy blocksync request error to debug. All this warning
means is that someone is requesting a tipset we don't have.
2. Add a separate warning if we fail to collect a chain. If we have the
tipsets but fail to collect the chain, something is actually wrong.
3. Fix a TODO and return a single CompactedMessages rather than 4
separate values.
* generally reduce the warning to info
It turns out we do fail to gather messages frequently as well, likely
because we have written the tipsets but haven't fetched the messages...
We can now atomically switch chains when checkpointing. Previously,
we'd call `SetHead` followed by `SetCheckpoint`. Unfortunately, that's
not atomic and the "head" could have reverted before we called
`SetCheckpoint` (causing the latter to fail).
Now, we just call `SetCheckpoint` and let `SetCheckpoint` adjust our
head. This changes the behavior of `ChainStore.SetCheckpoint`, but
`Syncer.SyncCheckpoint` is the only caller anyways.
1. Let the user specify `--remove-existing-chain=false` to avoid the
prompt and fail if there's an existing chain.
2. Only prompt when interactive. Otherwise, _don't_ remove the chain
by-default.