Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/check-btcli-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches:
- main
- staging
- master
types: [opened, synchronize, reopened, labeled, unlabeled]

env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches:
- main
- staging
- master
types: [opened, synchronize, reopened, labeled, unlabeled]

workflow_dispatch:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog

## 1.5.14 /2025-12-04
* Update: Adds support for custom extrinsic `DecryptionFailed` by @ibraheem-abe in https://github.com/opentensor/async-substrate-interface/pull/247

**Full Changelog**: https://github.com/opentensor/async-substrate-interface/compare/v1.5.13...v1.5.14

## 1.5.13 /2025-12-01
* Update `Checkout PR branch in async-substrate-interface` step by @basfroman in https://github.com/opentensor/async-substrate-interface/pull/240
* No continual reconnection without cause by @thewhaleking in https://github.com/opentensor/async-substrate-interface/pull/241
Expand Down
27 changes: 19 additions & 8 deletions async_substrate_interface/async_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ async def process_events(self):
and event["event"]["event_id"] == "ExtrinsicFailed"
) or (
event["event"]["module_id"] == "MevShield"
and event["event"]["event_id"] == "DecryptedRejected"
and event["event"]["event_id"]
in ("DecryptedRejected", "DecryptionFailed")
):
possible_success = False
self.__is_success = False
Expand All @@ -308,13 +309,23 @@ async def process_events(self):
self.__weight = dispatch_info["weight"]
else:
# MEV shield extrinsics
dispatch_info = event["event"]["attributes"]["reason"][
"post_info"
]
dispatch_error = event["event"]["attributes"]["reason"]["error"]
self.__weight = event["event"]["attributes"]["reason"][
"post_info"
]["actual_weight"]
if event["event"]["event_id"] == "DecryptedRejected":
dispatch_info = event["event"]["attributes"]["reason"][
"post_info"
]
dispatch_error = event["event"]["attributes"]["reason"][
"error"
]
self.__weight = event["event"]["attributes"]["reason"][
"post_info"
]["actual_weight"]
else:
self.__error_message = {
"type": "MevShield",
"name": "DecryptionFailed",
"docs": event["event"]["attributes"]["reason"],
}
continue

if "Module" in dispatch_error:
if isinstance(dispatch_error["Module"], tuple):
Expand Down
27 changes: 19 additions & 8 deletions async_substrate_interface/sync_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def process_events(self):
and event["event"]["event_id"] == "ExtrinsicFailed"
) or (
event["event"]["module_id"] == "MevShield"
and event["event"]["event_id"] == "DecryptedRejected"
and event["event"]["event_id"]
in ("DecryptedRejected", "DecryptionFailed")
):
possible_success = False
self.__is_success = False
Expand All @@ -269,13 +270,23 @@ def process_events(self):
self.__weight = dispatch_info["weight"]
else:
# MEV shield extrinsics
dispatch_info = event["event"]["attributes"]["reason"][
"post_info"
]
dispatch_error = event["event"]["attributes"]["reason"]["error"]
self.__weight = event["event"]["attributes"]["reason"][
"post_info"
]["actual_weight"]
if event["event"]["event_id"] == "DecryptedRejected":
dispatch_info = event["event"]["attributes"]["reason"][
"post_info"
]
dispatch_error = event["event"]["attributes"]["reason"][
"error"
]
self.__weight = event["event"]["attributes"]["reason"][
"post_info"
]["actual_weight"]
else:
self.__error_message = {
"type": "MevShield",
"name": "DecryptionFailed",
"docs": event["event"]["attributes"]["reason"],
}
continue

if "Module" in dispatch_error:
if isinstance(dispatch_error["Module"], tuple):
Expand Down
2 changes: 1 addition & 1 deletion async_substrate_interface/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ def _get_metadata_storage_functions(self, runtime: Runtime) -> list[dict[str, An
self.serialize_storage_item(
storage_item=storage,
module=module,
spec_version_id=self.runtime.runtime_version,
spec_version_id=runtime.runtime_version,
runtime=runtime,
)
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "async-substrate-interface"
version = "1.5.13"
version = "1.5.14"
description = "Asyncio library for interacting with substrate. Mostly API-compatible with py-substrate-interface"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
Loading