flashbots / ethers-provider-flashbots-bundle

Flashbots provider for ethers.js
543 stars 212 forks source link

What does 'conflictType: 5' mean in Flashbots getConflictingBundle? #105

Open e7172 opened 1 year ago

e7172 commented 1 year ago

Hi,

Hi, I'm stuck trying to figure out what the conflict is with my bundle, im using: getConflictingBundle

And I get this answer: { initialSimulation: { bundleGasPrice: '41031065837', bundleHash: '0xf25eaeb1a54b96cc6214a83f4e828209068ae0f83a99ffa33d7ed59c2dca24f7', coinbaseDiff: '16674245565912306', ethSentToCoinbase: '0', gasFees: '16674245565912306', results: [ [Object], [Object], [Object] ], stateBlockNumber: 17365166, totalGasUsed: 406381, firstRevert: undefined }, conflictType: 5, conflictingBundle: [], targetBundleGasPricing: { gasUsed: 406381, gasFeesPaidBySearcher: '38374796447176465', priorityFeesReceivedByMiner: '16674245565912306', ethSentToCoinbase: '0', txCount: 3, effectiveGasPriceToSearcher: '94430587176', effectivePriorityFeeToMiner: '41031065837' }, conflictingBundleGasPricing: undefined }

Buy im not sure what is conflictType: 5.

Base on what i read in this function:

export enum FlashbotsBundleConflictType { NoConflict, NonceCollision, Error, CoinbasePayment, GasUsed, NoBundlesInBlock }

Update: Based on what I understand, there are no other bundles in conflict, that's correct?

Also, i try the flashbots_getBundleStatsV2: { isSimulated: true, isHighPriority: true, simulatedAt: '2023-05-29T15:08:06.998Z', receivedAt: '2023-05-29T15:08:06.995Z', consideredByBuildersAt: [ { pubkey: '0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f', timestamp: '2023-05-29T15:08:07.003Z' }, .... ], sealedByBuildersAt: [ { pubkey: '0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f', timestamp: '2023-05-29T15:08:07.103Z' }, ..... ],

So, if the bundle has no conflicts, and was simulated and submitted within those times, I don't understand why it has not been included in the target block This happens to me with all the bundles I send to flashbots.

Any help would be appreciated.

Stanback commented 1 year ago

@e7172 I believe it maps to this enum so it would mean NoBundlesInBlock

The error is related to the blocks API, e.g. https://blocks.flashbots.net/v1/blocks?block_number=${blockNumber} and it means that the block was not a Flashbots block. For example, 17383586 is not Flashbots block but this one is: 17383620.

Also note that it could still be a MEV block that was picked up by another block builder, which the Flashbots blocks API doesn't (currently) know about.