fix(images): compile NEAR into the parser_app enclave binary - #464
Merged
prasanna-anchorage merged 1 commit intoAug 7, 2026
Merged
Conversation
CARGOFLAGS passes --no-default-features, so CHAIN_FEATURES is the authoritative list of chains linked into the image. It omitted near while parser_app's default feature set includes it, so the enclave binary shipped without a NEAR converter. proto_to_registry maps ProtoChain::Near unconditionally, but the registry registration is behind #[cfg(feature = "near")]. Without the feature the image builds and deploys clean and only fails when a real NEAR request arrives: the chain resolves and no converter is registered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot started reviewing on behalf of
shahan-khatchadourian-anchorage
August 7, 2026 17:36
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures the parser_app enclave image actually links NEAR support by including the near feature in the CHAIN_FEATURES list used for the --no-default-features build, preventing runtime “no registered converter” failures for CHAIN_NEAR requests.
Changes:
- Add
neartoCHAIN_FEATURESin the enclave image build so it mirrorssrc/parser/app/Cargo.toml’sdefaultfeature set. - Restore NEAR converter availability in production images built from
images/parser_app/Containerfile.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
prasanna-anchorage
approved these changes
Aug 7, 2026
prasanna-anchorage
deleted the
shahankhatchadourian/near-containerfile-chain-features
branch
August 7, 2026 20:24
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.
Follow-up to #430, per prasanna's approval note.
images/parser_app/Containerfile:19lists the chain visualizers compiled into the enclave image:CARGOFLAGS(line 5) passes--no-default-features, so this list is authoritative — a chain absent from it is not linked into the binary.parser_app'sdefaultfeature set is["ethereum", "near", "solana", "sui", "tron", "unspecified"], so the image shipped without NEAR support even though #430 makes NEAR reachable over gRPC. This addsnear, restoring the mirror the surrounding comment describes.Why this fails at runtime rather than at build time
src/parser/app/src/chain_conversion.rs:12mapsProtoChain::Near => RegistryChain::Nearwith no#[cfg]gate.src/parser/app/src/registry.rs:37gates the converter registration behind#[cfg(feature = "near")].Without the feature the image builds clean, deploys clean and passes CI. A
CHAIN_NEARrequest then resolves its chain successfully, finds no registered converter, and fails — only in production, only once a real NEAR transaction arrives.Notes
CHAIN_FEATURESappears in this one file and nowhere else — no Makefile override and no check comparing it against the crate'sdefaultset, so nothing would have caught the drift. A guard test is deliberately left out here to keep the fix to the one line; worth raising separately if the drift recurs.Also flagged as MEDIUM by @pepe-anchor on #430 (2026-08-05).
🤖 Generated with Claude Code