Skip to content

Conversation

@lev-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@ArniStarkware
Copy link
Contributor

crates/apollo_gateway/src/rpc_state_reader.rs line 112 at r1 (raw file):

        let block_info = block_header.try_into()?;
        Ok(block_info)
    }

Please delete this function.

It is never used in code (except for testing this function - delete the test as well.).

Code quote:

    pub async fn get_block_info(&self) -> RPCStateReaderResult<BlockInfo> {
        let get_block_params = GetBlockWithTxHashesParams { block_id: self.block_id };
        let reader = self.clone();

        let get_block_with_tx_hashes_result = tokio::task::spawn_blocking(move || {
            reader.send_rpc_request("starknet_getBlockWithTxHashes", get_block_params)
        })
        .await
        .map_err(|e| RPCStateReaderError::InternalError(format!("Join error {}", e)))??;

        let block_header: BlockHeader = serde_json::from_value(get_block_with_tx_hashes_result)
            .map_err(|e| {
                RPCStateReaderError::InternalError(format!("Failed to parse block header {}", e))
            })?;
        let block_info = block_header.try_into()?;
        Ok(block_info)
    }

@ArniStarkware
Copy link
Contributor

crates/apollo_gateway/src/errors.rs line 315 at r1 (raw file):

    StarknetApi(#[from] StarknetApiError),
    #[error("Internal error: {0}")]
    InternalError(String),

Please revert.

Code quote:

    #[error("Internal error: {0}")]
    InternalError(String),

@ArniStarkware
Copy link
Contributor

crates/apollo_gateway/src/rpc_state_reader.rs line 36 at r1 (raw file):

};

pub type StarknetResult<T> = Result<T, StarknetError>;

Delete this?

Code quote:

pub type StarknetResult<T> = Result<T, StarknetError>;

@lev-starkware lev-starkware force-pushed the 01-08-apollo_gateway_removing_usage_of_gateway_trates_in_rpc_state_reader branch from 3c34489 to 631fd8f Compare January 12, 2026 12:07
Copy link
Contributor

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ArniStarkware reviewed 3 files and all commit messages, made 1 comment, and resolved 3 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).

Copy link
Contributor Author

@lev-starkware lev-starkware left a comment

Choose a reason for hiding this comment

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

@lev-starkware made 3 comments.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).


crates/apollo_gateway/src/rpc_state_reader.rs line 36 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

Delete this?

Done.


crates/apollo_gateway/src/rpc_state_reader.rs line 112 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

Please delete this function.

It is never used in code (except for testing this function - delete the test as well.).

Done.


crates/apollo_gateway/src/errors.rs line 315 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

Please revert.

Done.

Copy link
Contributor

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).

@lev-starkware lev-starkware added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit 82039f3 Jan 13, 2026
24 of 31 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants