fix(state-manager): fix bug in the state-manager inspector (#3903)

* fix(state-manager): fix bug in the state-manager inspector
* fix missing config error
This commit is contained in:
AlexandreBelling
2024-09-06 10:47:11 +02:00
committed by GitHub
parent 72539a4b53
commit 0432ab07b9
3 changed files with 7 additions and 4 deletions

View File

@@ -258,9 +258,11 @@ func isAccRead(traces []DecodedTrace) (ok bool, err error) {
return false, err
}
// If the length is more than one. Intervert the first and the last entry of the array
// If the length is more than one, place the account-level trace at the end
if okFirst && len(traces) > 1 {
traces[0], traces[len(traces)-1] = traces[len(traces)-1], traces[0]
accTrace := traces[0]
copy(traces[:], traces[1:])
traces[len(traces)-1] = accTrace
}
if err = checkStorageTraceOrder(traces[:len(traces)-1]); err != nil {
@@ -392,6 +394,7 @@ func checkStorageTraceOrder(traces []DecodedTrace) (err error) {
err,
fmt.Errorf("storage trace %v has an HKey larger or equal than the next one `%x` >= `%x`", i, currHKey, nextHKey),
)
panic("boom")
}
}

View File

@@ -1,4 +1,4 @@
environment = "integration-full"
environment = "integration-benchmark"
version = "3.0.0" # TODO @gbotrel hunt all version definitions.
assets_dir = "./prover-assets"
log_level = 1 # TODO @gbotrel will be refactored with new logger.

View File

@@ -87,7 +87,7 @@ func validateIsPowerOfTwo(f validator.FieldLevel) bool {
type Config struct {
// Environment stores the environment in which the application is running.
// It enables us have a clear domain separation for generated assets.
Environment string `validate:"required,oneof=mainnet sepolia devnet integration-development integration-full"`
Environment string `validate:"required,oneof=mainnet sepolia devnet integration-development integration-full integration-benchmark"`
// TODO @gbotrel define explicitly where we use that and for why;
// if we supply as is to coordinator in responses, coordinator should parse semver