# JSON-RPC Enhancement in Geth

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2025-10-07
- Duration: 13:22
- Watch: https://streameth.org/watch/yt-2kO-LVS3tO4
- YouTube: https://www.youtube.com/watch?v=2kO-LVS3tO4

## Description

Introducing trace_* namespace and eth_getTransactionBySenderAndNonce into ethereum execution clients(geth,reth) to enhance the transaction and trace querying capabilities.

## Transcript

[Music] uh hi everyone this is J visa and I come State DV and to repace a transition this is really slow and uh it cost a lot of CPO uh so we want to introduce a real time in tracing system which will offer more efficient and promote insights into the EM execution and uh it will also support indexing the LIF execution datas uh such as chases the state differ and the as s um so let's see how can we go to uh how to inex Source left data um currently we uh support index in choices which is a which is grouped by a block and so this is a block number and minus two the ches and us us indexing is based on the n n this is uh we we want to index transition centers address plus uh is n to our transition H um so uh in in my explation I'm using uh kbdb your to STS newly created uh block ches and noes uh this is just this is just a genetical KV database and I use the EB in gas um for the king schema for the ches it is just a block number plus block has has and a chest Tab and for n it is uh used the king schema is transing centers address plus is n and this very just is just I encoded data so the imation is very is very small and very simple and for Chas tapers currently we support the Cod Chas and other chases such as the par Chas and this pred Tracer uh here is the uh is a workflow of indexing and we uh for each for each block uh we for Block we will index each transition based on the on on the T start hook and in this hook we will to see if we en n if if so we we first St NES in kbdb and if not we just continue and for each transition end we get uh transition result in in our local Chas in our local catch and when block is ended we we uh block chases into the kbdb and in the meantime we will notify our our background for in uh to notify him uh we have just uh index a new block and for will uh for this the newly created traces into rdb for infections and um so this is just for indexing and let's see how can we retri those data um first is we can retrieve it by block number and the or block has uh and for block for the transes for transitions we can Fe the block first by the transition has and then retrieve it by block number and fe uh fishes transes data by its index uh and the four n is is really simple we can just retrieve it by the CNS address and n uh and here is a just a small follow of the block chases Reet index yeah it's really uh it's it's very very simple just read the block now first and check the uh block data in is it's we in the kbdb or in the for DB and then return back to the column so uh how can I use this feature uh as currently this feature is not merged into the main in Master uh Master Branch so if uh if you are interested you can follow s PR and and see um how to use it uh the left side is uh is the configuration of the uh to enable the feature you just need to add s uh something like this in the left side and on right side I will I will I will I will introduce every configurations so first one pass is just a dictionary which is used to store s data and the second one in N ches is uh IND index the left Chas with to enable uh n Chas or not and the uh the third one M blocks is just um uh a block limit so uh after after such blocks way well PS all the datas just to set dis disc SI size and the for configure is it's um it's a map is a map to configure each tras and course each details we can uh you can refer to the buil in gas built interest is for more detail okay um currently we support s ipcs uh it's it's like par CH RPC and the the last one is uh the RPC just say is just proposal and it is not enable for other clients I think um besides of the parties Cod Tres we can also retrieve other gases native traces I think it is really useful when you want to get history um history data or history p data for one Trans on one block uh we can just like this just RBC uh in this example we can we need to retrieve TR for the block one yeah so next we can just take talk about per performance yeah uh before I talk about per performance uh in my in my mind that performance is just as space on the time trade offs in in this implementation we just use uh low cost disk to store the data instead of the uh High usage of the CPU so for uh say uh the the advantage of the feature is just you no you no need to re applies the chases based on the data and the time compation is very small it's just all1 and the ring is real is real time you can you can IND the data and then retrieve it back and the the disc Advantage is you need another disk space to store data and it may have a little impact on the on train block thinking yeah um here I just write some bmark to compare the results of the uh Chas IPC andb IPC yeah uh it's a just it's a scri to run uh to retrieve the data from the uh uh gas uh wise J IBC and uh this is a results uh of the uh just results uh the uper one is uh traditional CH block and lat one is the Chas block it is about 100 terms uh of fast T and traditional W yeah uh it's all than you thank you very much your question sure yeah hey thanks thanks for this I really appreciate it I think as a developer sometimes confusing because there's no standardization on the degle trace name spaces right the other RPC methods are in the execution API so they tend to be standardized across clients when you move to debug tracing it becomes a bit trickier other than than performance because some clients are going to implement debug some Implement Trace name space some do both other than performance like why would you recommend Trace over debug is there other reasons you would recommend that option for tracing uh it is more it's more custom customized you can you can just uh index data by your need yeah and because tradition the B tracing uh which is also support only support uh such as the par tra C trace and for C chasing and uh if you want to to index other you might need to WR a GS GS traser yeah yeah and the performance is really very uh is some some is not very good so in we just introduce this U uh leing Ching framework and the best on set you can just write your own ches right thank you I have another question unless someone else maybe Sorry probably miss this will be integrated into PR or when when it's going to be added together um actually um I'm not sure yeah U maybe this feature will be U much into Master branch and in in 4 or maybe when no no no need to for yeah yeah just attention maybe can you touch real quick on the um you were talking about some potential issues on the sinking side you had a con your second bullet point on the slide where you had pros and cons s i kind come back do you remember there was like two cons you mentioned one was like additional storage space uhuh for Trace was one of the disadvantages and then the second one was you said potential sinking issues yeah yeah yeah can you touch on that or go a bit more and just explain what you meant by that um or like at least I guess what you observed when you wear benchmarking uh actually say is not inside impation and I will I will I will I will attend it and maybe in other works yeah thank you thanks next uh so mostly the speed Improvement looks like it comes from caching and index in the data did you look at index in the built-in uh Native debug Trace uh uh your means the debug Trace yeah they pre-state in the corol trace so that you know you're basically saying half of the argument is it's faster mhm but most of that I suspect comes from the fact that you're indexing all the data did you look at index in the debug Trace course as well um I'm sorry I haven't so Mo most of the performance increase comes from no oh really yeah yeah not from the index no not not from index in the data yeah yeah yeah yeah yeah actually it's a performance yes really depends on the uh history data yeah yeah you need to F all the history data need to replace a transition so the performance is really yeah yeah because the this Fe is really slow yeah sorry I I guess like P backing on that question like the improvements that you shipped with trace the train name space could you not backport them to debug as well or is it is that not possible yeah because in in the left Tre uh the data is just uh generated and sted on when the trans isused once and when you use the de the data is uh just replied when you every time when you request it so in this intention we just start it once and feat at any time that's right but you're talking specifically about the life tracing here the realtime tracing or you also speaking about when you're cuz when you had that graph that was showing 100 milliseconds for Trace block right and then you had debug Trace block at the top that wasn't for Life tracing right that was just historical calls or where you can trace any block correct uh no no no actually for you need to index s State Force okay yeah just after the gas is started yeah yeah we get a we get a uh got it up here
