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/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 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" } # ] # }