Skip to content

feat(rpc): remove support for RPC versions lower and equal to v0.8#3474

Open
CHr15F0x wants to merge 10 commits into
mainfrom
chris/rm-rpc-le-v0.8
Open

feat(rpc): remove support for RPC versions lower and equal to v0.8#3474
CHr15F0x wants to merge 10 commits into
mainfrom
chris/rm-rpc-le-v0.8

Conversation

@CHr15F0x

@CHr15F0x CHr15F0x commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes: #3476

I'd appreciate as many eyes as possible on this due to the sheer size of the delta.

I've removed the older specs too. I see no reason to keep them, apart from misleading the reader of the repo that they are still somewhat relevant in the current release.

Tests:

  • 🟢 starknet.js
  • starknet.py ( 🟢 30, 🔴 4 investigating...)

@CHr15F0x CHr15F0x force-pushed the chris/rm-rpc-le-v0.8 branch 10 times, most recently from ac3ea0d to b45982a Compare June 15, 2026 10:39
@CHr15F0x CHr15F0x marked this pull request as ready for review June 15, 2026 10:58
@CHr15F0x CHr15F0x requested a review from a team as a code owner June 15, 2026 10:58
"signature": [],
"contract_address": contract_address,
"nonce": nonce,
"sender_address": sender_address,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking at the JSON-RPC spec, didn't INVOKE_TXN_V3 use sender_address already in v08? How did this even work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well, it didn't:

 ------------------------------------------------------------------------------
 Name                     |   # times run |        # fails |  trans/s |  fail/s
 ------------------------------------------------------------------------------
 1: v08_estimate_fee     
   1:                     |         1,372 |   1,372 (100%) |     1372 |    1372

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rn it's a valid V1 transaction, which actually works.

It used to be a V0 transaction, wrongly marked as a V1.

Comment thread crates/rpc/src/lib.rs
#[case::root_trace_websocket("/ws", "v09/starknet_trace_api_openrpc.json", &[], Api::WebsocketOnly)]
#[case::root_write("/", "v09/starknet_write_api.json", &[], Api::HttpOnly)]
#[case::root_write_websocket("/ws", "v09/starknet_write_api.json", &[], Api::WebsocketOnly)]
#[case::root_websocket(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, if case::root_api_websocket works with no excludes, why shouldn't this case? And isn't just one of them enough?

@t00ts

t00ts commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR is truly massive. Most of it looks correct but there's just too much to digest in one go, plus probably some small nuances about Starknet changes I cannot recall from memory. These I assume should be caught by the tests you're already running.

A question I do have is about all the now hardcoded V09. Some of these I see were V08 and have just been renamed. If these are tests pinning exact V09 behaviour that's fine, but if we're defaulting to this version in certain production code paths, we will have to change these again when V09 is eventually dropped too. Would be nice to keep a top-level constant for these "defaults" that we can just change, instead of having it all over the place.

Wdyt?

@CHr15F0x

Copy link
Copy Markdown
Contributor Author

This PR is truly massive. Most of it looks correct but there's just too much to digest in one go, plus probably some small nuances about Starknet changes I cannot recall from memory. These I assume should be caught by the tests you're already running.

A question I do have is about all the now hardcoded V09. Some of these I see were V08 and have just been renamed. If these are tests pinning exact V09 behaviour that's fine, but if we're defaulting to this version in certain production code paths, we will have to change these again when V09 is eventually dropped too. Would be nice to keep a top-level constant for these "defaults" that we can just change, instead of having it all over the place.

Wdyt?

Good idea, thanks 🙏 .

@zvolin zvolin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

first pass 😅 never had ff lagging that much

Comment on lines -244 to -249
if serializer.version < RpcVersion::V09 {
let parent_hash = self
.0
.ok_or_else(|| crate::dto::Error::custom("Missing parent block hash"))?;
serializer.serialize_field("parent_hash", &parent_hash)?;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this whole impl could now be removed, no?

Comment thread crates/rpc/src/pending.rs
pub fn get(
&self,
tx: &Transaction<'_>,
rpc_version: RpcVersion,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not just remove it?

Comment on lines -114 to -117
let failure_reason = match status {
TxStatus::Rejected { error_message, .. } => error_message,
_ => None,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems like a bug, both the current version and removing it. Looking at the spec, failure_reason should be derived from execution_status (REVERTED), not finality status. And it should not be removed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@CHr15F0x CHr15F0x force-pushed the chris/rm-rpc-le-v0.8 branch from b45982a to a963a7f Compare June 22, 2026 11:13
@CHr15F0x CHr15F0x force-pushed the chris/rm-rpc-le-v0.8 branch from a963a7f to b24cabd Compare June 22, 2026 14:02
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.

feat(rpc): remove support for RPC versions <= v0.8, make 0.9 the deafult version

5 participants