This PR brings back the "geth db freezer-migrate" tool in order for Nitro users to migrate legacy RLP receipts. Legacy receipt support, including support for migration, was dropped in v1.11.0 of geth and its users were supposed to have migrated before upgrading.
$ curl 'http://localhost:8547' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"eth_getLogs","params":[{"fromBlock":"0xA5", "toBlock":"0xA5"}]}' > a5_local
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2269 0 2172 100 97 1831k 83765 --:--:-- --:--:-- --:--:-- 2215k
$ curl 'https://arb1.arbitrum.io/rpc' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"eth_getLogs","params":[{"fromBlock":"0xA5", "toBlock":"0xA5"}]}' > a5_remote
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2269 0 2172 100 97 24358 1087 --:--:-- --:--:-- --:--:-- 25211
$ diff a5_local a5_remote
Check around the classic/nitro boundary (first nitro block is = 22207817)
$ curl 'https://arb1.arbitrum.io/rpc' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"eth_getLogs","params":[{"fromBlock":"0x152DD40", "toBlock":"0x152DD50"}]}' > classic_nitro_remote
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12542 0 12435 100 107 172k 1518 --:--:-- --:--:-- --:--:-- 174k
$ curl 'http://localhost:8547' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"eth_getLogs","params":[{"fromBlock":"0x152DD40", "toBlock":"0x152DD50"}]}' > classic_nitro_local
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12542 0 12435 100 107 4129k 36382 --:--:-- --:--:-- --:--:-- 6124k
$ diff classic_nitro_local classic_nitro_remote
This PR brings back the "geth db freezer-migrate" tool in order for Nitro users to migrate legacy RLP receipts. Legacy receipt support, including support for migration, was dropped in v1.11.0 of geth and its users were supposed to have migrated before upgrading.
For Arbitrum One, classic (pre-nitro) receipts were encoded in the legacy format, so eth_getLogs requests were failing for classic blocks: https://github.com/OffchainLabs/nitro/issues/1745
Testing done
Migrate the snapshot
The final error message about trying to sync a closed file can be ignored, the migration is complete.
Start older Nitro version
Start a version of Nitro where the support for legacy receipts has been removed.
test eth_getLogs
Check the block reported by @kaber2 (165)
Check around the classic/nitro boundary (first nitro block is = 22207817)