From 86c1db14c0c0ec7d40eb7ef93a4fa1636f613e64 Mon Sep 17 00:00:00 2001 From: kp2pml30 Date: Wed, 19 Aug 2026 14:47:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore(genvm):=20update=20runner=20hashes=20?= =?UTF-8?q?and=20align=20v0.3=20ABI=20names=20=E2=AC=86=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the v0.3 runner pins to the new ids, rename the raw fee-params aliases leader/validator_timeunits_allocation to leader/validator_time_units_allocation, and keep the wait_until rename of accepted to decided. --- genlayer_py/transactions/fees.py | 28 ++++++++++----------- genlayer_py/types/transactions.py | 2 +- tests/e2e/contracts/simple_time_contract.py | 4 +-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/genlayer_py/transactions/fees.py b/genlayer_py/transactions/fees.py index ba1a9e3..5780aad 100644 --- a/genlayer_py/transactions/fees.py +++ b/genlayer_py/transactions/fees.py @@ -19,9 +19,9 @@ class MessageType(IntEnum): class FeesDistributionInput(TypedDict, total=False): leaderTimeunitsAllocation: BigNumberish - leader_timeunits_allocation: BigNumberish + leader_time_units_allocation: BigNumberish validatorTimeunitsAllocation: BigNumberish - validator_timeunits_allocation: BigNumberish + validator_time_units_allocation: BigNumberish appealRounds: BigNumberish appeal_rounds: BigNumberish executionBudgetPerRound: BigNumberish @@ -54,9 +54,9 @@ class FeesDistribution(TypedDict): class InternalMessageFeeParamsInput(TypedDict, total=False): leaderTimeunitsAllocation: BigNumberish - leader_timeunits_allocation: BigNumberish + leader_time_units_allocation: BigNumberish validatorTimeunitsAllocation: BigNumberish - validator_timeunits_allocation: BigNumberish + validator_time_units_allocation: BigNumberish appealRounds: BigNumberish appeal_rounds: BigNumberish executionBudgetPerRound: BigNumberish @@ -368,7 +368,7 @@ def create_fees_distribution( _get( fee_distribution, "leaderTimeunitsAllocation", - "leader_timeunits_allocation", + "leader_time_units_allocation", ), "fees.distribution.leaderTimeunitsAllocation", ), @@ -376,7 +376,7 @@ def create_fees_distribution( _get( fee_distribution, "validatorTimeunitsAllocation", - "validator_timeunits_allocation", + "validator_time_units_allocation", ), "fees.distribution.validatorTimeunitsAllocation", ), @@ -444,7 +444,7 @@ def encode_internal_message_fee_params( _get( params, "leaderTimeunitsAllocation", - "leader_timeunits_allocation", + "leader_time_units_allocation", ), "internalMessageFeeParams.leaderTimeunitsAllocation", ), @@ -452,7 +452,7 @@ def encode_internal_message_fee_params( _get( params, "validatorTimeunitsAllocation", - "validator_timeunits_allocation", + "validator_time_units_allocation", ), "internalMessageFeeParams.validatorTimeunitsAllocation", ), @@ -1125,7 +1125,7 @@ def build_estimated_fees_distribution( "leaderTimeunitsAllocation": _get( options, "leaderTimeunitsAllocation", - "leader_timeunits_allocation", + "leader_time_units_allocation", default=DEFAULT_LEADER_TIMEUNITS_ALLOCATION if policy["enabled"] else 0, @@ -1133,7 +1133,7 @@ def build_estimated_fees_distribution( "validatorTimeunitsAllocation": _get( options, "validatorTimeunitsAllocation", - "validator_timeunits_allocation", + "validator_time_units_allocation", default=DEFAULT_VALIDATOR_TIMEUNITS_ALLOCATION if policy["enabled"] else 0, @@ -1193,12 +1193,12 @@ def _validator_index(num_of_validators: int) -> int: def _calculate_fee_for_round( num_of_validators: int, rotations: int, - leader_timeunits_allocation: int, - validator_timeunits_allocation: int, + leader_time_units_allocation: int, + validator_time_units_allocation: int, ) -> int: return rotations * ( - leader_timeunits_allocation - + num_of_validators * validator_timeunits_allocation + leader_time_units_allocation + + num_of_validators * validator_time_units_allocation ) diff --git a/genlayer_py/types/transactions.py b/genlayer_py/types/transactions.py index 89a25fe..43623cc 100644 --- a/genlayer_py/types/transactions.py +++ b/genlayer_py/types/transactions.py @@ -582,7 +582,7 @@ def _decode_pending_transactions( ), "value": int.from_bytes(pending_transaction[2], byteorder="big"), "on": ( - "accepted" + "decided" if int.from_bytes(pending_transaction[3], byteorder="big") == 0 else "finalized" ), diff --git a/tests/e2e/contracts/simple_time_contract.py b/tests/e2e/contracts/simple_time_contract.py index 974e801..3934130 100644 --- a/tests/e2e/contracts/simple_time_contract.py +++ b/tests/e2e/contracts/simple_time_contract.py @@ -1,7 +1,7 @@ # { # "Seq": [ -# { "Depends": "py-lib-genlayer-embeddings:09h0i209wrzh4xzq86f79c60x0ifs7xcjwl53ysrnw06i54ddxyi" }, -# { "Depends": "py-genlayer:1j12s63yfjpva9ik2xgnffgrs6v44y1f52jvj9w7xvdn7qckd379" } +# { "Depends": "py-lib-genlayer-embeddings:hqpree1t3470fnac2aeee1y5c2205k22bgk1p98sg8m3s1ndmxbg" }, +# { "Depends": "py-genlayer:5jycge4q8k23462jtb0b9fyey1s9qz928sz2nbrd9mg4sxqg2qng" } # ] # } From 6bdaabae730c2074a37a46e7e20410b8c59dd658 Mon Sep 17 00:00:00 2001 From: kp2pml30 Date: Fri, 21 Aug 2026 23:51:27 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(genvm):=20give=20VecDB=20its=20explicit?= =?UTF-8?q?=20distance=20metric=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pinned embeddings runner's `VecDB` takes the distance metric as a fourth type parameter. Three arguments now fail at contract import, which leaves the deploy without state rather than reporting a type error. `log_indexer_testnet.py` is deliberately left alone: it targets Asimov, which runs the older SDK. --- tests/e2e/contracts/log_indexer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/contracts/log_indexer.py b/tests/e2e/contracts/log_indexer.py index 040c736..9da7df2 100644 --- a/tests/e2e/contracts/log_indexer.py +++ b/tests/e2e/contracts/log_indexer.py @@ -23,7 +23,9 @@ class StoreValue: # contract class class LogIndexer(gl.contract.Contract): - vector_store: gle.VecDB[np.float32, typing.Literal[384], StoreValue] + vector_store: gle.VecDB[ + np.float32, typing.Literal[384], StoreValue, gle.EuclideanDistance + ] def __init__(self): pass