feat: Read Data on External Chains - #296
Draft
Aman035 wants to merge 12 commits into
Draft
Conversation
- 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
force-pushed
the
feat/read-from-chains-uv
branch
from
July 28, 2026 11:34
0334939 to
7eede40
Compare
Aman035
force-pushed
the
feat/read-from-chains-uv
branch
3 times, most recently
from
July 28, 2026 13:55
0b87100 to
808f459
Compare
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.
Aman035
commented
Jul 31, 2026
| MaxAgeSeconds uint64 | ||
| MaxDelaySeconds uint64 | ||
| PinnedBlockHeight uint64 // height all validators must query; 0 = not pinned by core | ||
| ExpiryTimestamp int64 // unix seconds; 0 = no expiry known |
Member
Author
There was a problem hiding this comment.
This will be ExpiryBlockHeight of PushChain
Aman035
commented
Jul 31, 2026
| // 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" |
Member
Author
There was a problem hiding this comment.
ChainNamespace or Namespace or ANY_OTHER_NAME
- In CAIP2
- Standard needs to be finalized for web2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.