Skip to content

feat: Read Data on External Chains - #296

Draft
Aman035 wants to merge 12 commits into
developfrom
feat/read-from-chains-uv
Draft

feat: Read Data on External Chains#296
Aman035 wants to merge 12 commits into
developfrom
feat/read-from-chains-uv

Conversation

@Aman035

@Aman035 Aman035 commented Jul 28, 2026

Copy link
Copy Markdown
Member

No description provided.

Aman035 added 6 commits July 28, 2026 16:59
- decode EvmQueryEnvelope (AccountBalance / ERC20Balance / ContractCall /
  StorageSlot) and SolanaQueryEnvelope (LamportBalance / SPLTokenAccount /
  RawAccountData) from ReadSpec.query
- ExecuteRead on each chain client: deterministic pinned-height queries,
  canonical result encoding for identical-bytes ballot voting
- new RPC methods: GetBalanceAt / GetStorageAt / GetHeaderByNumber (EVM),
  GetBalanceWithSlot / GetAccountInfoWithSlot (SVM)
- pushwatcher listener polls pending reads via gRPC and routes each
  READ_REQUEST event into the target chain's DB (Chains.GetStore)
- EventProcessor gains a READ_REQUEST branch: execute on the chain's own
  reader -> vote -> COMPLETED; corrupt/expired -> REVERTED; transient -> retry
- signer narrowed to consumer-side VoteSigner interface; evm/svm clients
  pass themselves as reader
- implementation plan in docs/read-from-chains-implementation-plan.md
@Aman035
Aman035 force-pushed the feat/read-from-chains-uv branch from 0334939 to 7eede40 Compare July 28, 2026 11:34
@Aman035
Aman035 changed the base branch from develop to refactor/uclient-chain-packages July 28, 2026 11:39
@Aman035
Aman035 changed the base branch from refactor/uclient-chain-packages to develop July 28, 2026 13:44
@Aman035
Aman035 force-pushed the feat/read-from-chains-uv branch 3 times, most recently from 0b87100 to 808f459 Compare July 28, 2026 13:55
Aman035 added 5 commits July 28, 2026 19:34
Chain clients own writes to their DB: pushwatcher resolves the target
client via GetClient (same as tss consumers) and hands it the event,
instead of writing into the chain's store directly. Drops the
ExternalChainStoreResolver interface and the chainDBs bookkeeping in
the chains manager.
ChainReader moves next to its consumer (EventProcessor), the uint256
canonical encoder moves to types.go, and the near-no-op bytes32 encoder
is inlined at its single call site.
All query types plus failure modes: eth_call revert, invalid envelopes,
transient RPC failures, slot/height constraints, SPL account validation.
MaxAgeSeconds uint64
MaxDelaySeconds uint64
PinnedBlockHeight uint64 // height all validators must query; 0 = not pinned by core
ExpiryTimestamp int64 // unix seconds; 0 = no expiry known

@Aman035 Aman035 Jul 31, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be ExpiryBlockHeight of PushChain

// ReadRequest mirrors the pending read request tracked by x/uexecutor.
type ReadRequest struct {
RequestID string // uint256 as 0x-prefixed hex (from ReadRequested event)
TargetChain string // CAIP-2, e.g. "eip155:1", "solana:mainnet-beta"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChainNamespace or Namespace or ANY_OTHER_NAME

  • In CAIP2
  • Standard needs to be finalized for web2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant