GETH Node - Build Custom Golang Tracer
Budget: $3,000 – $5,000 USD
Hi,
I am currently running a GETH node on BSC. Using one of the inbuilt "debug_traceCall" function, specifically the "callTracer". However it's very limited in its capacity. The main issue is it only returns internal contract call information and does not provide the state change from the execution of these trace calls.
The desired custom trace_call I wish to develop would allow for multiple batched trace_calls to be submitted on the current pending block, it would then return the state change of impacted contracts that the trace call transactions interacted with.
(Similar to parity's trace calls stateDiff feature)
https://docs.alchemy.com/alchemy/documentation/enhanced-apis/trace-api#state-difference-statediff
I am looking for a Golang engineer to build a custom tracer for my node called "multiTraceCallWithReserves".
debug_multiTraceCallWithReserves(pendingTransactions, targetContractAddresses)
What it does?
Receives a batch of pending transactions to trace. These will run similar to the existing callTracer method which unfurls internal calls, looking for interactions with any of our targetContractAddresses. If the unfurled traced call interacts with an address found within the targetContractAddresses array, then we save the altered state of the public reserves impacted by this trace call.
param: pendingTransactions - An array of transactions objects we wish to run a trace on to determine if they interact with any targetContractAddresses.
param: targetContractAddresses - An array of contract addresses we wish to detect state change on from traced pendingTransactions
storage object: stateDiffMap - If a traced call interacts with any of the addresses in the targetContractAddresses array, then we should store the changed state of the filtered contract to a hash map. We are only looking to store a single public object from the contract to the hash map, we are not interested in returning the full trace call.
stateDiffMap is returned at the end of the trace execution
Example of returned stateDiffMap where object key is the targetContractAddress which was called by one or many trace calls & the final state value it has after all traces were complete.
{
"0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae": {_r0: 54367654546, _r1: 213223245},
"0x8af064410c0ceaef0014f78d87d8c4ff5d4eb7a1": {_r0: 123324532453, _r1: 23444},
}
Notes:
- Traces should happen in natural mining order as to ensure the most accurate stateDiffMap is returned.
- Filtering of unnecessary state must be well optimised to ensure execution time is extremely quick (Goal is 100ms-1000ms).
Looking for someone who has strong experience with Golang, Ethereum & Geth Nodes.
Links to Geth Tracers (Github):
Go-Ethereum Javascript Tracers:
https://github.com/ethereum/go-ethereum/tree/master/eth/tracers/internal/tracers
Go-Ethereum Golang Tracers:
https://github.com/ethereum/go-ethereum/tree/master/eth/tracers
I am currently running a GETH node on BSC. Using one of the inbuilt "debug_traceCall" function, specifically the "callTracer". However it's very limited in its capacity. The main issue is it only returns internal contract call information and does not provide the state change from the execution of these trace calls.
The desired custom trace_call I wish to develop would allow for multiple batched trace_calls to be submitted on the current pending block, it would then return the state change of impacted contracts that the trace call transactions interacted with.
(Similar to parity's trace calls stateDiff feature)
https://docs.alchemy.com/alchemy/documentation/enhanced-apis/trace-api#state-difference-statediff
I am looking for a Golang engineer to build a custom tracer for my node called "multiTraceCallWithReserves".
debug_multiTraceCallWithReserves(pendingTransactions, targetContractAddresses)
What it does?
Receives a batch of pending transactions to trace. These will run similar to the existing callTracer method which unfurls internal calls, looking for interactions with any of our targetContractAddresses. If the unfurled traced call interacts with an address found within the targetContractAddresses array, then we save the altered state of the public reserves impacted by this trace call.
param: pendingTransactions - An array of transactions objects we wish to run a trace on to determine if they interact with any targetContractAddresses.
param: targetContractAddresses - An array of contract addresses we wish to detect state change on from traced pendingTransactions
storage object: stateDiffMap - If a traced call interacts with any of the addresses in the targetContractAddresses array, then we should store the changed state of the filtered contract to a hash map. We are only looking to store a single public object from the contract to the hash map, we are not interested in returning the full trace call.
stateDiffMap is returned at the end of the trace execution
Example of returned stateDiffMap where object key is the targetContractAddress which was called by one or many trace calls & the final state value it has after all traces were complete.
{
"0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae": {_r0: 54367654546, _r1: 213223245},
"0x8af064410c0ceaef0014f78d87d8c4ff5d4eb7a1": {_r0: 123324532453, _r1: 23444},
}
Notes:
- Traces should happen in natural mining order as to ensure the most accurate stateDiffMap is returned.
- Filtering of unnecessary state must be well optimised to ensure execution time is extremely quick (Goal is 100ms-1000ms).
Looking for someone who has strong experience with Golang, Ethereum & Geth Nodes.
Links to Geth Tracers (Github):
Go-Ethereum Javascript Tracers:
https://github.com/ethereum/go-ethereum/tree/master/eth/tracers/internal/tracers
Go-Ethereum Golang Tracers:
https://github.com/ethereum/go-ethereum/tree/master/eth/tracers