Bitcoin Forum
May 15, 2024, 06:44:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: How long does it take for a bitcoin node to find the latest block? on: March 14, 2021, 12:15:15 AM
I read somewhere that it can be inaccurate, so I thought it would be best to base the "time first seen" off of a block explorer's data since I assume they'd see it faster.
No guarantees that they are perfectly accurate as well. There are plenty of potential (small) delays from them getting the block, validating it, updating the site, their APIs, etc. Its much better to just host your own node yourself and use the RPC. After all, you wouldn't be rate limited by those APIs and there would also be times where you're faster than the block explorer, they're just another node like you.

Ahh okay, I'll probably use my node for that then, thanks.

If you have a poor latency to your peers, then you'll probably experience significant delays. Block headers are fairly small to relay and can be relayed first before the block itself so bandwidth is no issue there if you only want to be notified of the latest block.

On reality, if your node is fully synced, it'll use block compact where a node don't need to send whole blocks since most transaction already on your mempool.

To OP, you might want to read this page (https://bitcoincore.org/en/2016/06/07/compact-blocks-faq/) which contain few information about latency.

Thanks, I'll check it out.
2  Bitcoin / Bitcoin Technical Support / Re: How long does it take for a bitcoin node to find the latest block? on: March 13, 2021, 07:35:36 AM
Oh okay, if it's only a few seconds at the most then that's perfect. I was thinking that it may end up being like a minute.

A minute isn't COMPLETELY outside the realm of possibility, but it would be pretty unusual.  You'd have to be isolated from the larger network, and have one or more peers between your node and the full network that were extremely slow in relaying (perhaps intentionally?).

The block explorer doesn't matter too much for me, since I'll only be using it to get general information about unconfirmed transactions, such as the time they was first seen and the fee that they're using.

If you are already running your own full node, and you are already writing code to recognize new blocks, why trust a block explorer for "time first seen" or "transaction fee"?  Why not just capture for yourself when your node first sees the transaction, as well as what the fee is?

I read somewhere that it can be inaccurate, so I thought it would be best to base the "time first seen" off of a block explorer's data since I assume they'd see it faster.

I'm only using it to get the transaction fee since the request I'd be using to get the time shows that as well, saving me having to do a few more rpc requests.

I'm making a bot that pings users when their transactions confirm with details about it, so that's why I'm trying to make it accurate.
3  Bitcoin / Bitcoin Technical Support / Re: How long does it take for a bitcoin node to find the latest block? on: March 13, 2021, 05:50:31 AM
That depends on how well connected it is.

If it has a direct connection to the mining pool that solves the block, then your full node will hear about the block as soon as (or sooner than) any other blockchain explorer website.

If it does not have a direct connection to the mining pool that solves the block, then it could take as much as a few seconds (depending on just how many connections the block has to pass through before it gets to you and how fast those connections relay the block).

Unless you make a specific effort to configure your full bitcoin node to have a direct connection to all (or most) of the major mining pools, I'd expect your average time to be somewhere between those extremes.  Sometimes you'll get it a fraction of a second after the blockchain explorer site, and sometimes you'll get it at the same time (or maybe a fraction of a second before if they aren't well connected at that moment.

Oh okay, if it's only a few seconds at the most then that's perfect. I was thinking that it may end up being like a minute.

If you have a poor latency to your peers, then you'll probably experience significant delays. Block headers are fairly small to relay and can be relayed first before the block itself so bandwidth is no issue there if you only want to be notified of the latest block. As mentioned, the timing would vary depending on how many hops a specific block take before it reaches the target node and it would vary from time to time.

You also have to factor in the latency between the block explorer if you want to get your data from there. Here's a few blocks that I have compiled between two nodes that are fairly far apart, geographically. Interestingly, the difference is only 2 seconds but there's definitely insufficient sample size. Unfortunately, I'm unable to compare this to the Blockchair as they seem to be using Median time which doesn't reflect the actual time received.

Code:
Home Node: 2021-03-13T04:42:27Z UpdateTip: new best=0000000000000000000086661c2e8852a683d62aef5712d29e91918041c1f844 height=674386 version=0x20400000 log2_work=92.731396 tx=624319389 date='2021-03-13T04:42:17Z' progress=1.000000 cache=311.2MiB(2310354txo)
Dedicated Node: 2021-03-13T04:42:25Z UpdateTip: new best=0000000000000000000086661c2e8852a683d62aef5712d29e91918041c1f844 height=674386 version=0x20400000 log2_work=92.731396 tx=624319389 date='2021-03-13T04:42:17Z' progress=1.000000 cache=200.4MiB(116>

Home node: 2021-03-13T04:41:52Z UpdateTip: new best=000000000000000000091afc491f67dc650c37b33bdbacb2a5dd284d01090f00 height=674385 version=0x20000000 log2_work=92.731380 tx=624319194 date='2021-03-13T04:41:56Z' progress=1.000000 cache=310.4MiB(2304030txo)
Dedicated Node: 2021-03-13T04:41:50Z UpdateTip: new best=000000000000000000091afc491f67dc650c37b33bdbacb2a5dd284d01090f00 height=674385 version=0x20000000 log2_work=92.731380 tx=624319194 date='2021-03-13T04:41:56Z' progress=1.000000 cache=200.4MiB(116>

Home node: 2021-03-13T04:39:49Z UpdateTip: new best=00000000000000000001a00e6957773a5191493353f553249c0d97d8b2ffbadd height=674384 version=0x20000000 log2_work=92.731364 tx=624318828 date='2021-03-13T04:39:27Z' progress=1.000000 cache=309.6MiB(2297496txo)
Dedicated Node: 2021-03-13T04:39:47Z UpdateTip: new best=00000000000000000001a00e6957773a5191493353f553249c0d97d8b2ffbadd height=674384 version=0x20000000 log2_work=92.731364 tx=624318828 date='2021-03-13T04:39:27Z' progress=1.000000 cache=200.3MiB(116>

I plan on using an OVH VPS to host the bitcoin node, so hopefully the latency should be good enough.

The block explorer doesn't matter too much for me, since I'll only be using it to get general information about unconfirmed transactions, such as the time they was first seen and the fee that they're using.

Thanks for the help both of you Smiley
4  Bitcoin / Bitcoin Technical Support / How long does it take for a bitcoin node to find the latest block? on: March 13, 2021, 04:19:27 AM
I'm just wondering how long it would take an average full bitcoin node to find the latest block compared to the main blockchain explorers.

This is because I'm planning on using the bitcoin node to get information about new blocks, and it needs to be relatively fast.

I'd test it myself, but my internet is slow, and I don't want to have to buy a VPS until I'm sure that I want to do it this way.

Thanks.
5  Other / Beginners & Help / Why do some miners only confirm their own transaction? on: September 04, 2020, 04:17:49 AM
Every so often I see that some miners only confirm their own transaction, instead of confirming as many as possible, meaning they'd lose out on the extra BTC from the fees.

Here's an example from block 646643: https://mempool.space/block/00000000000000000003df4d47029e345e693663c0c28ad6aa44523d5f5f821f

Does anyone know why they do this? Are they just being lazy and don't want to hash the entire block or something?

Thanks.
6  Bitcoin / Bitcoin Technical Support / Is this double spending or not? on: May 29, 2020, 11:58:31 AM
The blog linked below claims that what they're doing is called double spending, but I always thought that it was done a different way.

https://blog.blockonomics.co/how-to-double-spend-bitcoin-using-electrum-no-technical-sorcery-required-78799b07cad7

Does anyone know if that is actually known as double spending?
7  Bitcoin / Bitcoin Technical Support / What's the term for this scenario? on: October 10, 2019, 05:34:55 AM
Hey guys, I'm just wondering what the proper term for this scenario below is.

1) Person 1 sends some bitcoin to Person 2 with a deliberately small fee so it never gets confirmed.
2) The bitcoin eventually gets returned to Person 1 as the fee was too low.

I've seen some people on another forums calling it double spending, but I'm pretty sure that's not what it is.

Thanks!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!