Problem
Program-code data has inconsistent versioning. instrumented_code is keyed by (runtime_id, code_id), but code_metadata, code_valid and valid_codes (ethexe/common/src/db.rs) are keyed only by code_id — even though they can be runtime/instrumentation-version specific (e.g. instrumentation status differs per CODES_INSTRUMENTATION_VERSION).
This forces hacks: the reinstrumentation-failure path in instrumented_code_and_metadata (ethexe/processor/src/handling/run/mod.rs) fabricates a CodeMetadata (reusing stale fields or defaults) solely to persist InstrumentationStatus::InstrumentationFailed.
Goal
Design proper versioning and invariants for program-code data:
- decide which fields are runtime/instrumentation-version specific and key them accordingly (e.g. with
runtime_id);
- define the invariants between
original_code, instrumented_code, code_metadata, code_valid, valid_codes;
- represent failed-instrumentation state without fabricating fake metadata.
Problem
Program-code data has inconsistent versioning.
instrumented_codeis keyed by(runtime_id, code_id), butcode_metadata,code_validandvalid_codes(ethexe/common/src/db.rs) are keyed only bycode_id— even though they can be runtime/instrumentation-version specific (e.g. instrumentation status differs perCODES_INSTRUMENTATION_VERSION).This forces hacks: the reinstrumentation-failure path in
instrumented_code_and_metadata(ethexe/processor/src/handling/run/mod.rs) fabricates aCodeMetadata(reusing stale fields or defaults) solely to persistInstrumentationStatus::InstrumentationFailed.Goal
Design proper versioning and invariants for program-code data:
runtime_id);original_code,instrumented_code,code_metadata,code_valid,valid_codes;