flashbots / flashbots-docs

Home Page:https://docs.flashbots.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add specs for the `flashbots_*` methods

optimiz-r opened this issue · comments

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:

  1. Relayer has not seen the bundle:
{
  isSimulated: false
}
  1. Relayer has seen the bundle but has yet to simulate it:
{
  isSimulated: true,
  isHighPriority: boolean, 
  receivedAt: string 
}
  1. 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?

those are indeed accurate, good idea. @optimiz-r -- thanks for opening!

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.

  1. Relayer has not seen the bundle:
{
  isSimulated: false
}
  1. Relayer has seen the bundle but has yet to simulate it:
{
  isSimulated: false,
  isHighPriority: boolean, 
  receivedAt: string 
}
  1. Relayer has simulated the bundle and the target block has been reached:
{ 
  isSimulated: true, 
  isHighPriority: boolean, 
  receivedAt: string, 
  simulatedAt: string, 
  consideredByBuildersAt?: BuilderEntry[], 
  sealedByBuildersAt?: BuilderEntry[]
}
  1. Relayer has simulated the bundle but the target block has not been reached
{ 
  isSimulated: true, 
  isHighPriority: boolean, 
  receivedAt: string, 
  simulatedAt: string
}

Please let us know any time when you find a different type of response. Will close the issue for now @optimiz-r