Add specs for the `flashbots_*` methods
optimiz-r opened this issue · comments
optimiz-r commented
As the relayer is not open-source, having the flashbots_*
method fully spec-ed out would be beneficial for strongly-typed client implementers.
Based on my testing with various bundles, I've identified three distinct response types:
- Relayer has not seen the bundle:
{
isSimulated: false
}
- Relayer has seen the bundle but has yet to simulate it:
{
isSimulated: true,
isHighPriority: boolean,
receivedAt: string
}
- Relayer has simulated the bundle:
{
isSimulated: true,
isHighPriority: boolean,
receivedAt: string,
simulatedAt: string,
consideredByBuildersAt?: BuilderEntry[],
sealedByBuildersAt?: BuilderEntry[]
}
where type BuilderEntry = { pubkey: string, timestamp: string }
.
Are these accurate?
brock smedley commented
those are indeed accurate, good idea. @optimiz-r -- thanks for opening!
George Zhang commented
Thanks a lot for the issue.
Below are the types of responses I can identify to the best of my knowledge. There could still be other edge cases.
- Relayer has not seen the bundle:
{
isSimulated: false
}
- Relayer has seen the bundle but has yet to simulate it:
{
isSimulated: false,
isHighPriority: boolean,
receivedAt: string
}
- Relayer has simulated the bundle and the target block has been reached:
{
isSimulated: true,
isHighPriority: boolean,
receivedAt: string,
simulatedAt: string,
consideredByBuildersAt?: BuilderEntry[],
sealedByBuildersAt?: BuilderEntry[]
}
- Relayer has simulated the bundle but the target block has not been reached
{
isSimulated: true,
isHighPriority: boolean,
receivedAt: string,
simulatedAt: string
}
George Zhang commented
Please let us know any time when you find a different type of response. Will close the issue for now @optimiz-r