Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0_8 starknet_traceBlockTransactions not working #2457

Open
GMKrieger opened this issue Dec 23, 2024 · 0 comments
Open

v0_8 starknet_traceBlockTransactions not working #2457

GMKrieger opened this issue Dec 23, 2024 · 0 comments

Comments

@GMKrieger
Copy link

When calling the starknet_traceBlockTransactions endpoint using rpc version 0_8, it returns this error:

Failed to get block tx traces: Other(TransportError(Json(Error("data did not match any variant of untagged enum JsonRpcResponse", line: 0, column: 0))))

When trying to run the tests, updating the serialize version from 07 to 08 on test_multiple_transactions made the test fail.

async fn test_multiple_transactions() -> anyhow::Result<()> {
let (context, next_block_header, traces) = setup_multi_tx_trace_test().await?;
let input = TraceBlockTransactionsInput {
block_id: next_block_header.hash.into(),
};
let output = trace_block_transactions(context, input).await.unwrap();
let expected = TraceBlockTransactionsOutput {
traces: traces
.into_iter()
.map(|t| (t.transaction_hash, t.trace_root))
.collect(),
include_state_diffs: true,
};
pretty_assertions_sorted::assert_eq!(
output
.serialize(Serializer {
version: RpcVersion::V07,
})
.unwrap(),
expected
.serialize(Serializer {
version: RpcVersion::V07,
})
.unwrap(),
);
Ok(())
}

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

No branches or pull requests

1 participant