From 7d3fe5891c5b93b7f9d27d0e111c2b5828ebcfe2 Mon Sep 17 00:00:00 2001 From: aitbc Date: Sat, 25 Apr 2026 08:13:33 +0200 Subject: [PATCH] fix: add ClassVar annotation to genesis_candidates in ChainSettings Pydantic v2 requires all class attributes to be annotated. genesis_candidates is a class-level constant, not a field, so it should be annotated as ClassVar. --- apps/blockchain-node/src/aitbc_chain/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/blockchain-node/src/aitbc_chain/config.py b/apps/blockchain-node/src/aitbc_chain/config.py index e0c3a71d..081eab24 100755 --- a/apps/blockchain-node/src/aitbc_chain/config.py +++ b/apps/blockchain-node/src/aitbc_chain/config.py @@ -1,7 +1,7 @@ from __future__ import annotations from pathlib import Path -from typing import Optional +from typing import Optional, ClassVar import uuid from aitbc.constants import DATA_DIR, KEYSTORE_DIR @@ -71,7 +71,7 @@ class ChainSettings(BaseSettings): # Sync settings trusted_proposers: str = "" # comma-separated list of trusted proposer IDs - genesis_candidates = [ + genesis_candidates: ClassVar[list[str]] = [ str(DATA_DIR / 'data' / 'genesis.json'), f"{DATA_DIR}/data/{chain_id}/genesis.json", f'{DATA_DIR}/data/ait-mainnet/genesis.json',