You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HISTORY.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Release History - open AEA
2
2
3
+
## 2.2.5 (2026-05-08)
4
+
5
+
Plugins:
6
+
7
+
- `open-aea-ledger-ethereum`: refactors `RPCRotationMiddleware` into a `RotatingHTTPProvider` (an `HTTPProvider` subclass) and constructs `Web3(RotatingHTTPProvider(...))` directly in `EthereumApi.__init__`. Rotation now lives at the transport layer, so the standard web3 middleware chain — defaults plus any user-injected middleware — runs untouched on every call. Fixes the v2.2.4 regression where `ledger_api.api.eth.<method>(...)` returned plain dicts instead of `AttributeDict`, breaking attribute access (e.g. `receipt.blockNumber`) for downstream consumers reaching into the underlying web3 handle directly (open-autonomy `TxSettler.settle()`, etc.). All inner middleware (`AttributeDictMiddleware`, `ENSNameToAddressMiddleware`, `FormattingMiddleware`, `BufferedGasEstimateMiddleware`, `GasPriceStrategyMiddleware`, and any user-injected `inject(layer=0)` middleware) — silently dead under the v2.2.4 bypass — now run normally. `ExtraDataToPOAMiddleware` reverts to its standard placement at `inject(layer=0)`. #889
8
+
-`open-aea-ledger-ethereum`: `RotatingHTTPProvider.endpoint_uri` is overridden as a property that reflects the *currently active* RPC URL, so diagnostic tooling (metrics, logs, request IDs) reading `w3.provider.endpoint_uri` post-rotation observes the correct endpoint instead of the URL passed to `super().__init__`. #889
9
+
-`open-aea-ledger-ethereum`: `RotatingHTTPProvider` raises `ValueError` at construction if `rpc_urls` (after Chainlist enrichment) is empty, replacing the silent failure that previously surfaced as an opaque `requests` error on the first RPC call. #889
10
+
-`open-aea-ledger-ethereum`: `_mark_rpc_backoff` and `_is_rpc_healthy` now run under the rotation lock (switched to `threading.RLock` so they remain callable from inside `_rotate`), closing a torn-read window on `_backoff_until` under concurrent error/rotation events. Unknown-category errors emit a `WARNING` log before re-raising so novel transport failures are no longer silent. `classify_error` now returns a `Literal[...]` so the categorical switches in `make_request` / `_handle_error_and_rotate` are mypy-checkable. #889
11
+
12
+
Tooling:
13
+
14
+
-`strategy.ini`: loosens the `urllib3` license-whitelist pin from `==2.6.3` to `>=2.6.3,<3` to track minor upgrades that `requests` resolves transitively. Resolves the `liccheck` CI failure where `requests` pulled `urllib3 2.7.0` while the strategy still authorized only `2.6.3`. #889
Copy file name to clipboardExpand all lines: docs/upgrading.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,32 @@ Below we describe the additional manual steps required to upgrade between differ
9
9
10
10
### Upgrade guide
11
11
12
+
## `v2.2.4` to `v2.2.5`
13
+
14
+
This is a non-breaking patch release. It fixes a v2.2.4 regression where `ledger_api.api.eth.<method>(...)` returned plain dicts instead of `AttributeDict` for downstream consumers reaching into the underlying web3 handle directly (most notably open-autonomy's `TxSettler.settle()`, which crashes on `receipt.blockNumber` attribute access). The fix is a structural refactor of RPC rotation; every public surface (`EthereumApi`, `ledger_api.api`, the web3 instance, the rotation behaviour) keeps the same semantics it had before v2.2.4.
15
+
16
+
### `open-aea-ledger-ethereum` — RPC rotation moved from middleware to provider
17
+
18
+
`RPCRotationMiddleware` (a Web3 middleware) has been replaced by `RotatingHTTPProvider` (an `HTTPProvider` subclass). `EthereumApi.__init__` now does `Web3(RotatingHTTPProvider(rpc_urls, ...))` instead of constructing a plain `HTTPProvider` and registering rotation as a middleware.
19
+
20
+
The motivation: as a middleware, rotation had to call pooled providers' `make_request` directly to retry against different endpoints — which bypassed every other web3 middleware on every call. v2.2.4 patched `ExtraDataToPOAMiddleware` and `AttributeDictTranslator` defensively but left the bypass in place, so `AttributeDictMiddleware` (and several other defaults) silently stopped running. Putting rotation at the transport layer puts it *under* the entire web3 chain — every request runs through the full middleware stack, and only the underlying socket changes when rotation occurs.
21
+
22
+
Practical impact for downstream consumers:
23
+
24
+
- Code that calls `ledger_api.api.eth.<method>(...)` directly (e.g. `eth.get_transaction_receipt`, `eth.send_raw_transaction`) once again receives `AttributeDict`-wrapped responses, so attribute access (`receipt.blockNumber`, `tx.hash`, etc.) works as in v2.2.3 and earlier.
25
+
- User-injected middleware at `inject(layer=0)` — silently bypassed under v2.2.4 — runs again.
26
+
-`ExtraDataToPOAMiddleware` returns to its standard `inject(layer=0)` placement. If you were programmatically inspecting `web3.middleware_onion` and asserting PoA was at the *outermost* position (the v2.2.4 workaround), revert that assertion to the pre-2.2.4 expectation, or look it up by name.
27
+
-`web3.provider.endpoint_uri` now reflects the currently active RPC URL after rotation rather than the first URL passed at construction.
28
+
- Constructing an `EthereumApi` (or `RotatingHTTPProvider` directly) with an empty `rpc_urls` list now raises `ValueError` at construction instead of failing on the first RPC call.
29
+
30
+
If you were pinning `open-aea-ledger-ethereum = "2.2.3"` to work around the v2.2.4 regression, you can drop the pin and upgrade to `2.2.5`.
31
+
32
+
### Concrete upgrade steps
33
+
34
+
-`pip install --upgrade "open-aea[all]==2.2.5"` (and the same `2.2.5` pin for any `open-aea-*` plugin you use, in particular `open-aea-ledger-ethereum`).
35
+
-`aea --version` should report `2.2.5`.
36
+
- No agent / package / config edits are required.
37
+
12
38
## `v2.2.3` to `v2.2.4`
13
39
14
40
This is a non-breaking patch release. The fixes target the `open-aea-ledger-ethereum` RPC rotation middleware and primarily affect Windows deployments, but two changes (PoA middleware ordering and `AttributeDictTranslator.to_dict` accepting plain `dict`) are global to all Ethereum users. Both are backwards-compatible.
0 commit comments