eq.log.Info("skipping unsafe payload, since it does not build onto the existing unsafe chain","safe",eq.safeHead.ID(),"unsafe",first.ID(),"payload",first.ID())
eq.log.Info("skipping unsafe payload, since it does not build onto the existing unsafe chain","safe",eq.safeHead.ID(),"unsafe",first.ID(),"payload",first.ID())
eq.unsafePayloads.Pop()
eq.unsafePayloads.Pop()
}
}
// Request the payload that builds upon the current unsafe head from the fallback RPC.
// This is a temporary alternative sync method- in the future, this will be done over the p2p network.
ifeq.cfg.BackupL2UnsafeSyncRPC!=""{
eq.log.Info("requesting unsafe payload from backup RPC","unsafe head",eq.unsafeHead.ID(),"first unsafe payload",first.ID(),"backup rpc",eq.cfg.BackupL2UnsafeSyncRPC)
// TODO: Create a client for the backup RPC and request the payload from the backup sync RPC via the `eth_getBlockByNumber` method.
// Once the payload has been received, verify its integrity and push it into the priority queue.
// TODO: Post Shanghai hardfork, the engine API's `PayloadBodiesByRange` method will be much more efficient, but for now,
// the `eth_getBlockByNumber` method is more widely available.
// Dial the backup unsafe sync RPC.
// TODO: Should this request block this thread (with a reasonable timeout) so that we can attempt to continue when the payload
// has been received and pushed into the priority queue? Or should it be made concurrently?