Changelog#
Release history for the Python SDK, including API changes and runner version updates.
v0.2.5#
fix: node pre-merge update
No runner changes from v0.2.4.
v0.2.4#
fix: patch det violation
No runner changes from v0.2.1.
v0.2.1#
fix: arm64-linux build
Runner |
From |
To |
|---|---|---|
cpython |
|
|
models-all-MiniLM-L6-v2 |
|
|
py-genlayer |
|
|
py-genlayer-multi |
|
|
py-lib-cloudpickle |
|
|
py-lib-genlayer-embeddings |
|
|
py-lib-genlayer-std |
|
|
py-lib-word_piece_tokenizer |
|
|
softfloat |
|
|
Commits touching runners:
chore: repair releaseembeddings related improvements (#241)Batch update (#238)Batch update (#235)spec: second iteration (#233)Batch update (#230)chore: prepare for releasebatch update (#227)
Runner |
Hash |
|---|---|
cpython |
|
models-all-MiniLM-L6-v2 |
|
py-genlayer |
|
py-genlayer-multi |
|
py-lib-cloudpickle |
|
py-lib-genlayer-embeddings |
|
py-lib-genlayer-std |
|
py-lib-protobuf |
|
py-lib-word_piece_tokenizer |
|
softfloat |
|
v0.1.8-runner-hash___#
Breaking Changes#
Calldata encoding behavior changed - dataclasses now encoded automatically without requiring custom
defaultparametergenlayer.py.public_abifile marked as auto-generated - manual edits will be overwritten
New Features#
Enhanced calldata encoding: Automatic dataclass encoding support without custom default functions
Standardized error types: New
VmErrorenum for consistent error handling across the platformExtended public ABI: Additional constants for internal VM operations (
CODE_SLOT_OFFSET)
API Improvements#
Simplified dataclass serialization - no longer requires explicit
defaultparameter incalldata.encode()Better type safety with standardized error enums
Cleaner API for encoding complex data structures
Runner |
From |
To |
|---|---|---|
py-genlayer |
|
|
py-genlayer-multi |
|
|
py-lib-genlayer-std |
|
|
Commits touching runners:
chore: update hashesfix: aboid asdict in calldatachore: add codegen
Runner |
Hash |
|---|---|
cpython |
|
models-all-MiniLM-L6-v2 |
|
py-genlayer |
|
py-genlayer-multi |
|
py-lib-cloudpickle |
|
py-lib-genlayer-embeddings |
|
py-lib-genlayer-std |
|
py-lib-protobuf |
|
py-lib-word_piece_tokenizer |
|
softfloat |
|
v0.1.3#
fix: hotfix for studio
Migration Guide#
This section provides code examples for migrating from v0.1.0 to v0.1.3:
Contract Interfaces#
# v0.1.0
contract = gl.ContractAt(address)
contract.view().some_method()
contract.emit().some_method()
# v0.1.3
contract = gl.get_contract_at(address)
contract.view().some_method()
contract.emit().some_method()
Error handling#
# v0.1.0
from genlayer import Rollback
gl.advanced.rollback_immediate("error message")
# v0.1.3
from genlayer.gl.vm import UserError # or use gl.vm.UserError
gl.advanced.user_error_immediate("error message")
VM operations#
# v0.1.0
gl.advanced.run_nondet(leader_fn, validator_fn)
# v0.1.3
gl.vm.run_nondet(leader_fn, validator_fn)
EVM contracts#
# v0.1.0
@gl.eth_contract
class MyEthContract:
# contract definition
# v0.1.3
@gl.evm.contract_interface
class MyEthContract:
# contract definition
Non-deterministic functions#
# v0.1.0
result = gl.get_webpage(url, mode='text')
response = gl.exec_prompt("prompt text")
# v0.1.3
result = gl.nondet.web.render(url, mode='text')
response = gl.nondet.exec_prompt("prompt text")
Equivalence principles#
# v0.1.0
result = gl.eq_principle_strict_eq(fn)
result = gl.eq_principle_prompt_comparative(fn, principle)
# v0.1.3
result = gl.eq_principle.strict_eq(fn)
result = gl.eq_principle.prompt_comparative(fn, principle)
Breaking Changes#
Removed
Rollbackexception from top-level imports - usegenlayer.gl.vm.UserErrorinsteadError handling methods now use
#errorand#get-schemaspecial method names fromgenlayer.py.public_abi.SpecialMethodContract interface changes:
eth_contractrenamed toevm_contract_interfacein EVM module
New Features#
Module reorganization: Core functionality moved to
genlayer.glnamespace with lazy loading for better performanceContract interface system: New
@contract_interfacedecorator for type-safe contract interactionsEnhanced contract deployment:
deploy_contractfunction with deterministic addressing via salt nonceContract proxy system:
get_contract_atfunction returns proxy objects withview()andemit()methodsAdvanced event system:
Eventclass with proper topic generation and indexed field supportVM operations: New
genlayer.gl.vmmodule withrun_nondet,spawn_sandboxfunctionsEVM integration: Enhanced
genlayer.py.evmmodule with contract generation capabilitiesEquivalence principles: New
genlayer.gl.eq_principlemodule withstrict_eq,prompt_comparative,prompt_non_comparativeAdvanced utilities:
genlayer.gl.advancedmodule withuser_error_immediateandemit_raw_event
API Improvements#
Storage system improvements with better slot management
Type annotations added for WASI bindings (
_genlayer_wasi.pyi)Enhanced error handling with
UserErrorreplacingRollbackBetter lazy loading system for improved import performance
Documentation generation support with
GENERATING_DOCSenvironment variable
Runner |
From |
To |
|---|---|---|
py-genlayer |
|
|
py-genlayer-multi |
|
|
py-lib-genlayer-std |
|
|
Commits touching runners:
batch update (#226)Batch update (#225)
Runner |
Hash |
|---|---|
cpython |
|
models-all-MiniLM-L6-v2 |
|
py-genlayer |
|
py-genlayer-multi |
|
py-lib-cloudpickle |
|
py-lib-genlayer-embeddings |
|
py-lib-genlayer-std |
|
py-lib-protobuf |
|
py-lib-word_piece_tokenizer |
|
softfloat |
|
v0.1.0#
fix: cross compilation
Runner |
From |
To |
|---|---|---|
cpython |
new |
|
models-all-MiniLM-L6-v2 |
new |
|
py-genlayer |
new |
|
py-genlayer-multi |
new |
|
py-lib-cloudpickle |
new |
|
py-lib-genlayer-embeddings |
new |
|
py-lib-genlayer-std |
new |
|
py-lib-protobuf |
new |
|
py-lib-word_piece_tokenizer |
new |
|
softfloat |
new |
|
Runner |
Hash |
|---|---|
cpython |
|
models-all-MiniLM-L6-v2 |
|
py-genlayer |
|
py-genlayer-multi |
|
py-lib-cloudpickle |
|
py-lib-genlayer-embeddings |
|
py-lib-genlayer-std |
|
py-lib-protobuf |
|
py-lib-word_piece_tokenizer |
|
softfloat |
|