Currently it is possible to use /live db carmen as --db-src for aida-vm-sdb command that has --archive enabled. This should be caught and blocked as it produces incomplete /archive database. Archive has to be initialized with go run ./database/mpt/tool init-archive before usage.
Steps to reproduce:
Prepare state_db_carmen_go-file_200000 with only livedb
GOGC=70 GOMEMLIMIT=24GiB /usr/local/src/aida/build/aida-vm-sdb substate --chainid=11155111 --substate-encoding pb --workers 30 --vm-impl lfvm --validate-tx --db-tmp tmp --db-impl carmen --aida-db sepolia-aida-db-0-250000/ --evm-impl ethereum --keep-db 5 200000
When trying to use state_db_carmen_go-file_200000 there is no error that it is missing an archive and processing works correctly.
GOGC=70 GOMEMLIMIT=24GiB /usr/local/src/aida/build/aida-vm-sdb substate --chainid=11155111 --substate-encoding pb --workers 30 --vm-impl lfvm --validate-tx --db-tmp tmp --db-impl carmen --archive --archive-variant s5 --aida-db sepolia-aida-db-1-8200000/ --evm-impl ethereum --keep-db --db-src tmp/state_db_carmen_go-file_200000 200001 220000
Incomplete archive is only detected when such incomplete state_db_carmen is reused
GOGC=70 GOMEMLIMIT=24GiB /usr/local/src/aida/build/aida-vm-sdb substate --chainid=11155111 --substate-encoding pb --workers 30 --vm-impl lfvm --validate-tx --db-tmp tmp --db-impl carmen --archive --archive-variant s5 --aida-db sepolia-aida-db-1-8200000/ --evm-impl ethereum --keep-db --db-src tmp/state_db_carmen_go-file_220000 220001 230000
...
Total elapsed time: 0s; last block 0; total transaction rate ~0.00 Tx/s, ~0.00 MGas/s
cannot create StateDb; cannot open carmen database; failed to open database: archive and live state hashes do not match: archive: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 != live: 0xa8e0c9ddc0f02835b5b2e3a36164565318663d1144b6545cba5b305e699a117a
state-db is nil
Datasource:
https://storage.googleapis.com/aida-repository-public/sepolia/sepolia-aida-db-0-250000.tar.gz
Currently it is possible to use
/livedb carmen as--db-srcforaida-vm-sdbcommand that has--archiveenabled. This should be caught and blocked as it produces incomplete/archivedatabase. Archive has to be initialized withgo run ./database/mpt/tool init-archivebefore usage.Steps to reproduce:
Prepare
state_db_carmen_go-file_200000with only livedbWhen trying to use
state_db_carmen_go-file_200000there is no error that it is missing an archive and processing works correctly.Incomplete archive is only detected when such incomplete
state_db_carmenis reusedDatasource:
https://storage.googleapis.com/aida-repository-public/sepolia/sepolia-aida-db-0-250000.tar.gz