Resolve merge conflicts in PR #190: Fix token2022 additional_data indexing#199
Closed
Resolve merge conflicts in PR #190: Fix token2022 additional_data indexing#199
Conversation
Copilot
AI
changed the title
[WIP] Resolve merge conflicts in PR #190
Resolve merge conflicts in PR #190: Fix token2022 additional_data indexing
Jul 1, 2025
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.
This PR resolves the merge conflicts in PR #190 that were preventing the integration of improved token2022 additional_data indexing functionality.
Background
PR #190 aimed to fix a critical gap in token2022 support where
additional_data(including decimals, interest bearing config, and scaled UI amount config) was only indexed whenInitializeMint2instructions were processed through surfpool. This meant:decimalsfield was being capturedChanges Made
Core Functionality Improvements
Enhanced Token Account Indexing (
crates/core/src/surfnet/svm.rs):RPC Layer Updates (
crates/core/src/rpc/accounts_data.rs):get_token_account_balanceto handle both SPL Token and Token-2022 accountsPreserved Main Branch Features
Blockhash Validation (
crates/core/src/rpc/full.rs):MAX_RECENT_BLOCKHASHESfunctionality for properlast_valid_block_heightcalculationProgram Authority Management (
crates/core/src/rpc/surfnet_cheatcodes.rs,crates/core/src/surfnet/locker.rs):set_program_authorityRPC method and implementationCode Quality Improvements
warntoerrorfor account update failures (more appropriate severity)Technical Details
The key improvement is moving from instruction-based to account-data-based indexing:
Before (instruction-based):
After (account-data-based):
Impact
This merge ensures that:
The resolved conflicts maintain backward compatibility while significantly improving token2022 support coverage.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/modelcontextprotocol/rust-sdk/commits/main/home/REDACTED/.rustup/toolchains/1.85.0-x86_64-REDACTED-linux-gnu/bin/cargo check --quiet(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.