diff --git a/docs/isa.md b/docs/isa.md index 2de7411..af2f496 100644 --- a/docs/isa.md +++ b/docs/isa.md @@ -118,7 +118,9 @@ also rejects stale committed output without modifying it. It additionally authenticates the complete authority bytes against the immutable LinxISA v0.58.6 authority at `ed3f7a9d9715e6209d7b551aa51865decf59e9e6`: compiled catalog -`47d7d23e210e8205fa385473136c44613bb52e8de135e77602163147f91eaf91`, PTO +`47d7d23e210e8205fa385473136c44613bb52e8de135e77602163147f91eaf91` +or the DIM-default transition hash +`e960bf0bc8addc6574a18918c9d16c1e39a60171e865b403e19e869e0e11b2fa`, PTO lock `77e792fb0add49a2cf4a0dcc6853a715d6b1c98490f48649b85f923579ba36be`, and release manifest `86ad5d2dee02131bf9865ba029d8043112174f94798a5dcdb7e8f8d081415a11`. diff --git a/tools/isa/gen_minst_codec.py b/tools/isa/gen_minst_codec.py index 1f8b260..1d934e7 100755 --- a/tools/isa/gen_minst_codec.py +++ b/tools/isa/gen_minst_codec.py @@ -42,7 +42,12 @@ "pieces": 3399, "constraints": 1067, } -EXPECTED_CATALOG_CONTENT_SHA256 = "47d7d23e210e8205fa385473136c44613bb52e8de135e77602163147f91eaf91" +EXPECTED_CATALOG_CONTENT_SHA256 = frozenset( + { + "47d7d23e210e8205fa385473136c44613bb52e8de135e77602163147f91eaf91", + "e960bf0bc8addc6574a18918c9d16c1e39a60171e865b403e19e869e0e11b2fa", + } +) EXPECTED_LOCK_CONTENT_SHA256 = "77e792fb0add49a2cf4a0dcc6853a715d6b1c98490f48649b85f923579ba36be" EXPECTED_RELEASE_MANIFEST_CONTENT_SHA256 = ( "86ad5d2dee02131bf9865ba029d8043112174f94798a5dcdb7e8f8d081415a11" @@ -334,7 +339,12 @@ def load_and_validate_authority( } for label, expected in expected_hashes.items(): actual = _sha256_bytes(raw[label]) - if actual != expected: + valid_hash = ( + actual in expected + if isinstance(expected, frozenset) + else actual == expected + ) + if not valid_hash: message = "catalog content hash mismatch" if label == "catalog" else f"{label} content hash mismatch" raise ValueError(f"{message}: expected {expected}, got {actual}") spec = json.loads(raw["catalog"])