Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

feat(rpc): Implement starknet_traceBlockTransactions RPC call #1372

Closed
Tbelleng opened this issue Jan 12, 2024 · 11 comments
Closed

feat(rpc): Implement starknet_traceBlockTransactions RPC call #1372

Tbelleng opened this issue Jan 12, 2024 · 11 comments
Assignees
Labels
backlog Ready to be picked enhancement New feature or request

Comments

@Tbelleng
Copy link
Contributor

feat(rpc): Implement starknet_traceBlockTransactions

This PR aims to implement starknet_traceBlockTransactions rpc call introduced in v0.4.0-rc1 according to the v0.5.1 RPC specs described in #1291

starknet_traceBlockTransactions

Retrieve traces for all transactions in the given block

Arguments

block_id : the hash of the requested block, or number (height) of the requested block, or a block tag

Return

Returns the execution traces of all transactions included in the given block

Errors

This function might return the following errors:

BLOCK_NOT_FOUND - The specified blocj could not be found.
@Tbelleng Tbelleng added the enhancement New feature or request label Jan 12, 2024
@aniketpr01
Copy link
Contributor

@Tbelleng can i take this?

@Tbelleng
Copy link
Contributor Author

Yes, just check with @tdelabro before !

@aniketpr01
Copy link
Contributor

@Tbelleng
Checked with @tdelabro and he approved.
Just to understand context, need to implement this RPC call which returns execution traces of all transactions included in the given block, why we may encounter the error mentioned above?

@Tbelleng
Copy link
Contributor Author

Nice ! @aniketpr01
If the given block doesn't exist (like the value is false, or the given block hash is false) its should return the following error :
BLOCK_NOT_FOUND

@tdelabro
Copy link
Collaborator

The main concern is that I have no idea how you will get the execution traces.
I think you will have to re-execute the whole block in some way, while recording the trace somewhere.
What is your plan @aniketpr01 ?

@aniketpr01
Copy link
Contributor

@tdelabro
As discussed on TG, I can utilize runtime_api() to simulate and re-execute tx's in an environment of block preceding the one of interest (block n-1).
This can enable me to trace and collect execution details of a block and implement this RPC call.

@tdelabro tdelabro assigned aniketpr01 and unassigned Tbelleng Jan 17, 2024
@aniketpr01
Copy link
Contributor

yes @tdelabro, I will be working on it!

@tdelabro tdelabro added the backlog Ready to be picked label Jan 19, 2024
@tdelabro tdelabro added this to Madara Jan 19, 2024
@tdelabro tdelabro moved this to 🏗 In progress in Madara Jan 19, 2024
@Tbelleng
Copy link
Contributor Author

yes @tdelabro, I will be working on it!

how its going ? @aniketpr01

@aniketpr01
Copy link
Contributor

@Tbelleng
I am still debugging simulating the transactions and requesting some more time on this!
Also could you please share your Telegram id or if you can DM me? TG: aniketpr01

@Tbelleng
Copy link
Contributor Author

@Tbelleng I am still debugging simulating the transactions and requesting some more time on this! Also could you please share your Telegram id or if you can DM me? TG: aniketpr01

Done !

@tdelabro tdelabro moved this from 🏗 In progress to ✅ Done in Madara Feb 6, 2024
@tdelabro
Copy link
Collaborator

closed by #1416

@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog Ready to be picked enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants