bitcoin core – How does a full node decide which outbound peers to have?

I understand that a full node can have up to 10 outbound connections (8 full relay peers and 2 block-relay-only peers). I wonder how my full node decides which nodes to connect to for outbound. What are the selection criteria does a node use to evaluate if a peer is good?

If I want to connect to a new specific peer (let’s say I know the node’s owner IRL or something) but I have already reached my outbound capacity, what specific criteria does my node use to decide which outbound peer to drop in order to make room for the new peer?

bitcoin core – Wallet Recovery Help

I’m seeking help from the Bitcoin community to recover lost funds from a wallet.dat file. Someone I know asked me to help recover their lost funds – but I’m stumped and now seeking help from the experts.

Facts

  • A wallet.dat file was created in approximately July 2017
    • Ubuntu Linux (v17.10?)
    • Bitcoin Core QT (v0.16.2?)
    • The original wallet.dat file was backed up and remains accessible
  • Bitcoin was purchased on Coinbase and sent offsite to an initial receiving address within this wallet
  • A few months pass…
  • Additional bitcoin is purchased on Coinbase and sent offsite to NEWLY GENERATED receiving addresses (99% sure the same wallet)
  • A few years pass…
  • The person now wants to send their funds back to Coinbase for sale
  • They have the original wallet.dat file, but Bitcoin Core software only displays one receiving address (the initial one)

Problems

  • The wallet.dat file was backed up ONLY ONCE, and PRIOR to the generation of those additional receiving addresses
  • The device used to create the new receiving addresses cannot be found!
  • Loading the wallet.dat file into current Bitcoin Core software does not display the subsequent transactions or receiving addresses! Only the initial receiving address!

Questions

  • Can the funds for all transactions be recovered?
  • What about the funds which were sent to the new receiving addresses, which were created POST BACKUP of the wallet.dat file?
  • BONUS: If they can be recovered, what’s the best software to accomplish this, and can it also be done for the Bitcoin Cash which presumably remain associated to this wallet.dat file? Ideally without re-syncing the whole blockchain.

I was under the impression that the wallet.dat file contained a private key which corresponds to any / all newly created receiving addresses, but I must be mistaken.

Any advice would be greatly appreciated. The person is at a dead end and I’m fresh out of ideas.

Thank you

bitcoin core – Block version 0x20000000

When i run getblocktemplate, Bitcoind gives me in the version field a decimal number, when i convert it to Hex it’s 20000000

I know it must be in little endian, but to build the blockheader must i put it like this 00000020 or 02000000 ?

I am asking this question because in version 1 the blockheaders are using 01000000 and not 00000010 so i am confused

Help is appreciated

Thanks to all of you

applications – How to implement APK pipelines in Android core under Software Interoperability Act, enacted by the Congress?

re.:
How to implement APK pipelines in Android core under Software Interoperability Act, enacted by the Congress

Software interoperability is well supported in health industry, enabling patient’s test data from one medical equipment to read by another equipment to make COVID-19 treatment an integrated process between health institutes, hospitals.

There are Ts of applications developed by third parties in Google Play store, which don’t interoperate, since were never intended to be run in pipelines.

Good example is live analog audio input processing

APKs in the store, generally read audio as input, process and output live, to file, via Bluetooth, WiFi

Since I build Live Audio > MIDI stream > MIDI animation + sound out software pipeline, made of
APKs developed by third parties

my pipeline works in off-line mode, manually operated only.

I can run 2 applications in parallel,

  1. reading audio input from analog grand piano, converting to MIDI
    but MIDI streaming or output to streaming device is not supported.

All I can do is to save generated MIDI to file

  1. I need to open second app and open saved MIDI file within it and manually click to open it
    to have MIDI animation generated live.

Under Software Interoperability Act, enacted by Congress, developers of software,
may offer interfaces, API, streaming devices to support building of software pipelines made
of software blocks developed by third parties.

Contacting developers fails to work since one is living in Osaka Japan, another in Spain and one another somewhere in the Internet space, not responding to email contacts.

So let me know state-of-the-art in Software Interoperability in case of Android and Android APKs, published via Play Store
and if such tools, of interest to me and other, are offered by Android core development team.

thank you

Unable to connect to Litecoin Testnet with Litecoin Core on Mac

I’ve downloaded the LiteCoin Core for the Mac (High Sierra 10.13.3) in order to use the testnet for testing an online shopping cart. I’m not looking to mine any coins, just use the wallet. The application loads up correctly when connecting to the normal wallet, but when I add testnet=1 to the litecoin.conf, it won’t connect to the peers. When I look at the debug log, I see

2018-03-01 14:37:02 connect() to 104.236.211.206:19335 failed after select(): Connection refused (61)
2018-03-01 14:37:03 connect() to 173.209.44.34:19335 failed after select(): Connection refused (61)
2018-03-01 14:37:03 connect() to 173.209.44.34:19335 failed after select(): Connection refused (61)
2018-03-01 14:37:04 connect() to 66.178.182.35:19335 failed after select(): Connection refused (61)
2018-03-01 14:37:04 connect() to 66.178.182.35:19335 failed after select(): Connection refused (61)
2018-03-01 14:37:05 connect() to 173.209.44.34:19335 failed after select(): Connection refused (61)

I’ve tried adding an RPC user/pass, but still no go. Error 61 seems to relate to the service not running on the port on the destination machine. I’m in an office environment, so cannot make any network changes. Is there anything I’m missing?

Here is my current litecoin.conf

rpcuser=litecoinrpc
rpcpassword=mypasswordhere
testnet=1

encryption – Bitcoin core wallet backup corrupted by an external tool

A file with the AXX file extension is an AxCrypt Encrypted file. AxCrypt is a file encryption program that scrambles (encrypts) a file to the point that it’s unusable without first being decrypted with a specific password/passphrase.

When an AXX file is created, it’s automatically assigned the exact same name as the unencrypted file but with the .AXX file extension appended to the end. For example, encrypting vacation.jpg results in a file called vacation.jpg.axx.

You can double-click an AXX file to open it with the AxCrypt software. However, note that if you’re signed in to your AxCrypt account, double-clicking the AXX file will open the true file and not actually decrypt the AXX file.

Use the program’s File > Open Secured menu to open the AXX file but not actually decrypt it. To decrypt the AXX file requires that you either right-click it and choose AxCrypt > Decrypt or use the File > Stop Securing option

Abandon transaction in Bitcoin Core with -zapwallettxes (transaction isn’t online in mempool yet)

I have a question about removing transactions from Bitcoin Core.

I know that you should be able to remove unconfirmed transactions from Bitcoin Core using the command “-zapwallettxes“.
The problem is that the transaction has been removed in Bitcoin Core software but still exists in the Bitcoin network.

But what happens in the following case:
The blockchain of the Bitcoin Core software is about 2 years behind. Now a new transaction has been made.
The transaction is displayed in Bitoin Core as unconfirmed.
But since I cannot find any transaction online in a blockchain explorer under the transaction ID, I assume that the Bitcoin Core software did not transfer the transaction to the bitcoin network at all. Apparently this happens only after the blockchain has been completely synchronized.
Is that correct?

And if so, I have a question:
Is it possible to use the command “-zapwallettxes”? And if so, then the transaction should have been completely undone, since it was never sent to the bitcoin network.

Is this correct or does it not work for some reason, if the blockchain of the Bitcoin Core software is outdated?

I already tried to right-click on my transaction and to select command “Abandon transaction”, but it was grayed out and therefore not selectable. Therefore I hope to be able to use “-zapwallettxes”.

Can anyone tell me if this is how it should work to use “-zapwallettxes” to get my bitcoins back into my wallet?

Thank you.

LG,
G0L5X

bitcoin core – How to use getblocktemplate method with Bitcoinlib Library

I am using
bitcoinlib to communicate with bitcoin-qt

This is the code i tried:

 Dim BitcoinService As Services.RpcServices.RpcService.IRpcService = New Services.Coins.Bitcoin.BitcoinService("http://localhost:8332", "Username", "Password", "wallet password", 200)

for getblocktemplate this is the call

   Dim seg As JToken = "{""rules"": (""segwit"")}"

        RichTextBox5.Text = BitcoinService.GetBlockTemplate(seg).PreviousBlockHash

It gives me this error

BitcoinLib.ExceptionHandling.Rpc.RpcInternalServerErrorException
  HResult=0x80131500
  Message=JSON value is not an object as expected
  Source=BitcoinLib
  Arborescence des appels de procédure :
   à BitcoinLib.RPC.Connector.RpcConnector.MakeRequest(T)(RpcMethods rpcMethod, Object() parameters)
   à BitcoinLib.Services.CoinService.GetBlockTemplate(Object() parameters)
   à WindowsApp3.Form1.Button2_Click(Object sender, EventArgs e) dans C:UsersHamasourcereposWindowsApp3WindowsApp3Form1.vb :ligne 76
   à System.Windows.Forms.Control.OnClick(EventArgs e)
   à System.Windows.Forms.Button.OnClick(EventArgs e)
   à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   à System.Windows.Forms.Control.WndProc(Message& m)
   à System.Windows.Forms.ButtonBase.WndProc(Message& m)
   à System.Windows.Forms.Button.WndProc(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String() commandLine)
   à WindowsApp3.My.MyApplication.Main(String() Args) dans  :ligne 81

  Cette exception a été levée à l'origine dans cette pile des appels :
    System.Net.HttpWebRequest.GetResponse()
    BitcoinLib.RPC.Connector.RpcConnector.MakeRequest<T>(BitcoinLib.RPC.Specifications.RpcMethods, object())

Exception interne 1 :
WebException : Le serveur distant a retourné une erreur : (500) Erreur interne du serveur.


I dont understand what i am doing wrong, i think it’s a json problem

Help is appreciated, thank you

bitcoin core – Read block info from log

I’m new in the Bitcoin world, but I want do the script. The script will read “blocks” from debug.log, but now when I looking to a debug.log I don’t see anything about blocks. Is it possible?

Here is example from my log:

(D:2020-04-13T18:58:49Z) (mempool) Added 30e28c7a2ad288fa3457569423b388f43e0b874032dd14c8bfc1db49777c6746 to mempool (txs=3182).
(D:2020-04-13T18:58:50Z) (net) Requesting 1/1 txs from peer with getdata (131.188.40.191:8333).
(D:2020-04-13T18:58:50Z) (mempool) Added 0ee02ea46ea6c06a3c0addcf651612f8681272310f583f2bd3f273d0c14c3cf0 to mempool (txs=3183).
(D:2020-04-13T18:58:50Z) (net) Requesting 6/6 txs from peer with getdata (194.15.231.236:8333).
(D:2020-04-13T18:58:50Z) (mempool) Added 86e5a85abc674e432aeffef3876772ea8588dc2cdab79ed236041b8875a171e7 to mempool (txs=3184).
(D:2020-04-13T18:58:50Z) (mempool) Added fc5c9d831785b1e43b0f9adb4333d7ed23562b332a061f958f7f98dcd5397043 to mempool (txs=3185).
(D:2020-04-13T18:58:50Z) (mempool) Added 5742cd2c1f376720596ee0256ca825b2940cf22b7b6e681c3666b46fb72fe144 to mempool (txs=3186).
(D:2020-04-13T18:58:50Z) (mempool) Added e8222822f1fba4fb8dd4d2aa60e6d42b38f2ef35c98e09f81961d72c4502beb1 to mempool (txs=3187).
(D:2020-04-13T18:58:50Z) (mempool) Added 123d121ec06bf8cfaeefb5ba25ed303fa82ee75e8179452cfb4be80d7cfd7161 to mempool (txs=3188).
(D:2020-04-13T18:58:50Z) (mempool) Added 59b40a817ffc223361ec07874abb889d0769c8bb6155cb6cdf175680221a0f77 to mempool (txs=3189).

bitcoin core – Private Key leakage due to reusing same address, how to prevent?

1 What precisely is the meaning of “reusing”? Is it receiving multiple times coins to the same btc address? Or is it also about sending coins?

2 How can people avoid this leaking of information when using a wallet, best practices?

3 How many times of reusing could be enough to seriously allow leakage/reingeneering of the key? Just one time is enough ? Possible to make any estimations?

4 Is this reusing problem only inherent to bitcoin? Or which other blockchains would you know of with same issues?