Bitcoin Forum
April 23, 2024, 12:26:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there any online (web) tool where I could broadcast a new block I mined?  (Read 310 times)
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 24, 2020, 08:18:03 AM
Merited by OgNasty (2), ABCbits (1)
 #1

I have a transaction stuck in TestNet which is not being mined, so I decided to mine it myself.
The problem is that Denovo's P2P network implementation is incomplete so I can't broadcast the block I find, which is why I'm looking for a workaround to broadcast that block.

Code:
Mining...
Finished
elapsed time: 00:02:49.4430433
block height: 1670930
block header: 000000207afc873c6dd49c55a8ec591947e65ea8e3c993f67ba5e5f8b522e35e000000007fbb3f2100ca7f1af3dc16b448f3a94f0e0556a4c86fb6a1f6fa316ebc615df81dc0795effff001d1418859f
block hash: 00000000eadf03548790f5aefd32f4c11b131b29229664a9a039fd1ad3466ea3

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
1713875173
Hero Member
*
Offline Offline

Posts: 1713875173

View Profile Personal Message (Offline)

Ignore
1713875173
Reply with quote  #2

1713875173
Report to moderator
1713875173
Hero Member
*
Offline Offline

Posts: 1713875173

View Profile Personal Message (Offline)

Ignore
1713875173
Reply with quote  #2

1713875173
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
TheBeardedBaby
Legendary
*
Offline Offline

Activity: 2184
Merit: 3134


₿uy / $ell


View Profile
March 24, 2020, 08:27:10 AM
 #2

I don't think you going to get much of support here,this section it's mostly for discussions and your question will drown quickly in the sea of spam. Better move your thread in this section > Bitcoin Technical Support .

ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7403


Crypto Swap Exchange


View Profile
March 24, 2020, 12:45:48 PM
 #3

I never try it, but Bitcoin Core console have command called submitblock which used to submit new block to network.

Here's help information from Bitcoin Core.

Code:
submitblock "hexdata" ( "dummy" )

Attempts to submit new block to network.
See https://en.bitcoin.it/wiki/BIP_0022 for full specification.

Arguments:
1. hexdata    (string, required) the hex-encoded block data to submit
2. dummy      (string, optional, default=ignored) dummy value, for compatibility with BIP22. This value is ignored.

Examples:
> bitcoin-cli submitblock "mydata"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 24, 2020, 01:13:33 PM
Merited by hugeblack (1)
 #4

Doesn't submitblock command require the node to be fully synced? I remember reading that it first "verifies" the block before broadcasting it which would require being synced.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
March 25, 2020, 11:56:34 PM
Last edit: March 26, 2020, 02:07:49 PM by jackg
 #5

Block explorers don't seem to like the idea of pushing blocks, I had a quick look at smartbit and blockchain.com and neither seem very happy with it.

You can push a hex transaction but I'm guessing you're after pushing the entire block for experimental purposed, in which case, what etf suggested might be your best option, I think the testnet blockchain is similar to the size of the litecoin blockchain and on my dual core 2GHz laptop, it seemed to take only about 8 hours to download and store the entire thing. It's not the best but if you really need it it's not that bad - load it up before sleep and wake up with the full sync.
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 26, 2020, 04:45:37 AM
 #6

what HCP suggested might be your best option,
Did you mean "ETFbitcoin" or was one comment deleted?

I think the testnet blockchain is similar to the size of the litecoin blockchain and on my dual core 2GHz laptop, it seemed to take only about 8 hours to download and store the entire thing. It's not the best but if you really need it it's not that bad - load it up before sleep and wake up with the full sync.
That is 22.5 GB blockchain, ignoring the chainstate. It's a bit high just to broadcast one block, not to mention eventually I am going to download it with my own code as soon as I can fix my P2PNetwork namespace which is why I don't want to do it twice.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7403


Crypto Swap Exchange


View Profile
March 26, 2020, 07:36:23 AM
Last edit: March 26, 2020, 08:07:30 AM by ETFbitcoin
Merited by Coding Enthusiast (10)
 #7

I think the testnet blockchain is similar to the size of the litecoin blockchain and on my dual core 2GHz laptop, it seemed to take only about 8 hours to download and store the entire thing. It's not the best but if you really need it it's not that bad - load it up before sleep and wake up with the full sync.
That is 22.5 GB blockchain, ignoring the chainstate. It's a bit high just to broadcast one block, not to mention eventually I am going to download it with my own code as soon as I can fix my P2PNetwork namespace which is why I don't want to do it twice.

That's certainly wasteful of resource (especially if you have slow connection), i assume software you use can't connect to Bitcoin Core client?


P.S. i have fully synced testnet full node (originally used to learn more about Bitcoin, but eventually only used to test LN in past), PM me if you trust me to broadcast it.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 26, 2020, 07:56:10 AM
 #8

That's certainly wasteful of resource (especially if you have slow connection), i assume software you use can't connect to Bitcoin Core client?

P.S. i have fully synced testnet full node (originally used to learn more about Bitcoin, but eventually only used to test LN in past), PM me if you trust me to broadcast it.

Thanks for the offer.
The problem is not trust though since it is TestNet and it is a block, the problem is that I'm already wasting a lot of time starting to mine the next block and by the time I copy the result and send it to you it could be already too late and you could end up in a "fork".
I've already sent you a block (#1671095) I found in ~5 min in PM though. Edit: ... someone else found the same block after 20 minutes. Cheesy

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
DaveF
Legendary
*
Offline Offline

Activity: 3458
Merit: 6232


Crypto Swap Exchange


View Profile WWW
March 28, 2020, 12:22:38 AM
Merited by Coding Enthusiast (2)
 #9

Similar to what ETFBitcoin said, in theory if I setup a full testnet node and opened the ports and gave you the RPC name and password could you do it that way?
Not sure if that would work for you. Also, not sure where the VM with the testnet node is but that would just take a little bit of looking on the VM server :-)

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7403


Crypto Swap Exchange


View Profile
March 28, 2020, 11:25:53 AM
Merited by DaveF (1)
 #10

Similar to what ETFBitcoin said, in theory if I setup a full testnet node and opened the ports and gave you the RPC name and password could you do it that way?
Not sure if that would work for you. Also, not sure where the VM with the testnet node is but that would just take a little bit of looking on the VM server :-)

-Dave

There's major security concern if you enable RPC connection over internet, see https://github.com/bitcoin/bitcoin/blob/master/doc/JSON-RPC-interface.md#security

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DaveF
Legendary
*
Offline Offline

Activity: 3458
Merit: 6232


Crypto Swap Exchange


View Profile WWW
March 28, 2020, 12:42:08 PM
 #11

Similar to what ETFBitcoin said, in theory if I setup a full testnet node and opened the ports and gave you the RPC name and password could you do it that way?
Not sure if that would work for you. Also, not sure where the VM with the testnet node is but that would just take a little bit of looking on the VM server :-)

-Dave

There's major security concern if you enable RPC connection over internet, see https://github.com/bitcoin/bitcoin/blob/master/doc/JSON-RPC-interface.md#security

Yes and no.
If I only allow Coding's IPs then it's mitigated and with a long complex username / password it's mitigated a bit more

But in the end it's a VM just running bitcoin in testnet so even if it gets trashed I really don't care.
Probably going to spin up a new one anyway because as pathetic as this next line is it's true:
I can't find it......Somewhere someplace I have a virtual drive image with nothing but Win10 and bitcoin on it set to testnet. Not sure where it is at the moment.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 30, 2020, 04:30:05 AM
 #12

Thanks Dave for the offer, I really appreciate it.
@ETFbitcoin helped me find a mistake in my difficulty assessment which makes it a bit harder for me to find blocks in a competing way. I still haven't had time to fix that part. I will post an update here if I could successfully fix it in which case I may be able to broadcast it myself since the bug doesn't seem to be with my P2PNetwork implementation anymore.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
September 28, 2020, 09:16:54 AM
Merited by ABCbits (1)
 #13

It took me some time but I finally fixed most of the issues I had with my P2PNetwork implementation so I could come back to this today to mine and submit my first block to TestNet blockchain.
Block #1,836,446 https://tbtc.bitaps.com/1836446
Block version is weird because it is copied from previous block, the block is empty because I don't have any mempool yet and it is just an experiment at this point.
Going to test more things now on TestNet, I'll probably submit some of my RegTest block experiments here too.

Thanks again for your help guys.

P.S. Interesting thing was that core nodes that I connected to sent me back the same block as Inv message for some reason (highest version was 0.19.0.1).

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
September 30, 2020, 10:41:12 PM
 #14

Out of curiosity, how did you actually mine the block? Huh

Did you just manually construct one, then started hashing until you found a nonce that fit the lowest difficulty and waited until a block had not been found for a while and the difficulty reset before broadcasting? (Possibly having to rehash if a new block was broadcast in the meantime)

Or are you running a more "traditional" mining setup with a CPU/GPU/ASIC miner and just got "lucky" with the TestNet difficulty? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
October 01, 2020, 04:52:19 AM
 #15

Out of curiosity, how did you actually mine the block? Huh

Did you just manually construct one, then started hashing until you found a nonce that fit the lowest difficulty and waited until a block had not been found for a while and the difficulty reset before broadcasting? (Possibly having to rehash if a new block was broadcast in the meantime)

Or are you running a more "traditional" mining setup with a CPU/GPU/ASIC miner and just got "lucky" with the TestNet difficulty? Huh
No, this is my own implementation of Bitcoin protocol and since at this point the library part (Bitcoin.Net) is almost finished I'm testing parts that don't have unit tests while improving the API.
It is a modified miner using only 2 of CPU cores and I run it only when I'm trying to create new test vectors like my last commit. I'll probably add GPU support when I start adding GPU support to FinderOuter.
As for difficulty, I'm simply manipulating it to submit my test blocks. I still have to get lucky to find a good block since I don't produce that much hashrate but it is easier.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!