I am developping a bot for a customer with the following goals in mind:

  • to inscribe a satoshi with the block number that it has been mined in (ordinal inscription) on every block. i think this is called bitmap, and you write blocknumber.bitmap.

I have managed to build this bot, connect it to my local bitcoincore node and spam a minting transaction every block by listening to the number returned via "getblock" command to bitcoin core, but i don't know how to actually pick the block that the transaction will be minted in since this seems to be a random process decided by miners and their management of the mempool. So what happens is that the block number inscribed is rarely the correct one, since i try to write either the current block number or the current block number +1 or +2.

Is there a process that would allow me to either decide which block my transaction will get mined in, or to dynamically change the text as it is mined to get the actual block number?

1 Answer 1


There is no way to reliably pick the block in which your transaction will be mined. The best you can do is to broadcast your transaction right after the previous block is mined, and set the fee high enough to get it into the next block. However, this won't always work:

  • Transactions propagate through the network with random deliberate delays to protect the privacy of the originating node. This means a miner can find the next block before the transaction reaches them. You might be able to bypass these delays by submitting your transaction directly to all miners and pools that support it. Even without these delays the miner could mine the block before updating their block template, which they might do once every few seconds.
  • The next block could include transactions submitted privately to the miner (pool) that overpay your transactions and push it out of the next expected block. You wouldn't see these transactions in your mempool and so you might set the fee too low. Worse yet, the miner could be selling the entire block space in a private deal for a token mint or whatever, and no fee could get you in. Finally, your desired block might end up being empty.

Transaction locktimes don't help you because a transaction can only be broadcast after its locktime expires. Recently I've seen calls for creating an extension to the mempool that would accept transactions with soon-expiring locktimes, which would help in your case as all miners would have your transaction at the time it's ready to be mined.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.