Bitcoin Forum
July 25, 2024, 03:02:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 »
1  Bitcoin / Development & Technical Discussion / Re: BlockReduce: Scaling Blockchain to human commerce on: November 19, 2018, 11:12:03 AM
Are there or are there not legal and tax implications with respect to explicitly selecting a geographic location from which your transaction originates?
2  Bitcoin / Development & Technical Discussion / Re: Development Environment to get started on: November 18, 2018, 02:02:29 PM
This is an insult to Satoshi who used Windows/Visual Studio in first versions and could be a reason why he left the project.

Ask yourself the following question if you are a Visual Studio developer or any other IDE developer ?!
Would you quite the project you are working on if IDE changed to something you have no experience with and ditch years of IDE experience ?


Just a few weeks ago I built the entire project in Visual Studio 2017 and ran it through the debugger.   Using vcpkg (https://docs.microsoft.com/en-us/cpp/vcpkg?view=vs-2017) helps a lot with the dependencies.  I had never used it prior to attempting the build, so if I can do it then any competent programmer should be able to as well.

3  Bitcoin / Development & Technical Discussion / Re: Reading Bitcoin code on: January 08, 2018, 08:21:44 PM
This is probably a good place to start:
https://github.com/bitcoin/bitcoin/blob/master/src/bitcoind.cpp#L188

Code:
int main(int argc, char* argv[])

Lol.  I couldn't help laugh  a little . 

You can also jump to AppInitMain() in the "init.cpp" file. Here are some notes I took once when walking through the code:

Code:
AppInitMain()  		// init.cpp
 - Creates the service queue thread (CScheduler::serviceQueue()) which runs "forever" until interrupted and adds it
   to the "threadGroup" (a boost::thread_group which was created in AppInit() in bitcoind.cpp)
   - Inside serviceQueue(), it's a big while-loop, which essentially dequeues and calls the next task in the queue:
         Function f = taskQueue.begin()->second;  // "second" is like the 2nd thing in a tuple, which is a function call.
         // .. other stuff
         f();  // call the actual function
4  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANNOUNCEMENT] ⚡️⚡️⚡️ Bitcoin Flash = Instantly Confirmed Bitcoin Transactions on: January 05, 2018, 06:54:38 PM
So, does this mean there is a developer budget coded into the consensus? (looks like 150000 coins starting on the 3rd block mined after fork):

consensus.BTFHeight = 502502;
consensus.BTFInitialBudget = 150000 * COIN
consensus.nBudgetPaymentsStartBlock = consensus.BTFHeight + 2;

Plus, there's only one developer and he/she has no other repository history on Github.

Why don't you provide more background info.
5  Bitcoin / Development & Technical Discussion / Re: How does an HD wallet know about addresses created from Master Public Key? on: December 12, 2017, 03:06:16 AM
I suspect you'll find it is the derivation path he is using is incorrect.

I'll guess he has gone with the "standard" m/44'/0'/0' derivation path specified in BIP44 and used by hardware wallets etc... most likely used if it was done by a "library". The problem is that Electrum uses a derivation path of m/0

Both paths will generate "valid" public keys/addresses... but they'll be different.

THANK YOU!

Your tip ultimately directed me to this link: https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use

Using the same logic from the approved answer on StackExchange, we updated our code and, voila, the addresses generated match the ones in Electrum

You made my day, HCP (and bob123)

6  Bitcoin / Development & Technical Discussion / Re: How does an HD wallet know about addresses created from Master Public Key? on: December 11, 2017, 08:49:28 PM
You can set the gap limit with this command:
Code:
wallet.storage.put('gap_limit',[i]X[/i])
Or you could create a bunch of new addresses to see if its contained in there:
Code:
for i in range(0, X): print wallet.create_new_address(false)
false: for recieving addresses
true: for change adresses

I thought about doing this too.  I'll try it if all else fails.

Are you sure this address was derived correctly? He may have used the derivation path for change adresses?
The standard derivation path for electrum is 0/0/ for recieving and 0/1/ for change addresses (i think).

This is a good question and I don't know the answer. I'll ask him and find out. Maybe he's doing it incorrectly.
Thanks for your answer.
7  Bitcoin / Development & Technical Discussion / Re: How does an HD wallet know about addresses created from Master Public Key? on: December 11, 2017, 04:24:16 PM
Electrum has the same master public key that is used in the service you've stated. With that, Electrum will constantly query for transactions in addresses within the gap limit.

For example, your gap limit is 25 addresses. After the initial address generated by default by Electrum, Electrum will continue to look for transactions in the next 25 address. If the next address has a transaction associated with it, Electrum will query another 25 addresses after it, and so on.

Thanks!

Is there a way to tell Electrum to query beyond the gap limit?  Or, better yet, is there a way to tell Electrum to look for an address that was derived in an external application (like that CoinSimple example I gave) that might be beyond the configured gap limit?

Here's my actual problem:  I have a developer that is using a source code library that can take a MPK and derive a child address from it.  He wrote a test program that did this (using the MPK from my electrum wallet), and I sent a small amount of coin to it.  However, this address never appears in the Electrum wallet.  But it must be a valid child address because it was generated from the same master public key (MPK) and the transaction was successfully broadcast and included in a block.

Thanks in advance for any of your input.
8  Bitcoin / Development & Technical Discussion / How does an HD wallet know about addresses created from Master Public Key? on: December 11, 2017, 11:50:43 AM

Say I have an Electrum HD wallet and give my Master Public Key to an external service (like CoinSimple for example: https://coinsimple.com/support/how-can-i-accept-bitcoin-directly-to-my-electrum-wallet-using-coinsimple/ )

That service can use my MPK to derive addresses that receive money in transactions.

How does the Electrum wallet know about those transactions? 
Does the wallet make RPC function calls internally to search/import for these transactions and addresses? 

9  Bitcoin / Electrum / Re: Anyone successfully run electrum daemon / service on a Windows machine? on: December 11, 2017, 02:02:43 AM
why not use the free 12 months trial of amazon aws you can start launch linux os in their ec2 for free and you can start your project to make your own payment gateway. Or use some third party like bitpay or gourl (for wordpress)

Good idea. but  I think I will just run a full node and use the RPC interface there, which works fine on Windows.
10  Bitcoin / Hardware wallets / Re: Are Hardware Wallets to be trusted? on: December 10, 2017, 04:56:46 PM
Seems most of the people responding here didn't bother to read about subliminal channels before giving their 2c of wisdom. 

It looks like covert messages can be embedded in the signature itself.  This would be bad. Real bad. 

My simpleton solution would be to use paper wallets and sign transactions offline with a vetted copy of something like coinb.in where you can review the code line by line to verify that "k" is not being gamed.

Thoughts, smart people?

11  Bitcoin / Electrum / Anyone successfully run electrum daemon / service on a Windows machine? on: December 10, 2017, 01:44:42 PM
I just want JSONRPC access to the electrum wallet.  I see the article here: http://docs.electrum.org/en/latest/merchant.html  which shows that it does support the RPC interface , but it's assuming you are on Linux.

Does anyone know if this can this be done with the Windows version?

12  Bitcoin / Development & Technical Discussion / Block explorers that show details of unconfirmed transactions - how? on: December 08, 2017, 11:22:55 PM
So if you submit a transaction and it hasn't been confirmed yet, that means it's not on the blockchain right?
Does this mean that when you visit those block explorers (like blockchain.info etc) and you view the unconfirmed transaction, they are pulling the info from their node's mempool?

13  Bitcoin / Development & Technical Discussion / What happens if mempool grows huge? on: December 08, 2017, 10:54:16 AM
Noticing the mempool is around 175MB right now and wondering how bitcoin core nodes handle the case if it grows too large (500mb - 1gb).  Is there a hard limit at which point all new transactions are basically rejected? Or does the software flush older transactions in order to accept new.  What is the MB limit?

14  Bitcoin / Development & Technical Discussion / Re: Choosing Transactions on: December 07, 2017, 11:14:42 AM
The nonce in the block header is a 4 byte integer.  Therefore there are only 4294967296 possible nonce values for any given header. After that, you need to modify the header in some other way to gain another 4294967296 nonce attempts.  Common ways to modify the header are to adjust the 4 byte timestamp or to change the transaction list so as to get a new merkle root.

This makes sense.  I guess since they're hashing the data, they could just change one piece (like the timestamp), and then they can reset the nonce to zero and start incrementing again.
thank you for your input.
15  Bitcoin / Development & Technical Discussion / Re: Choosing Transactions on: December 06, 2017, 08:42:15 PM
When a miner solves the nonce value, is that the proof of work

Yes.

The miner keeps trying new nonce values until they find one such that hashing the 80 byte block header results in a value that is less than the current difficulty target value.  The fact that the block header (which includes the nonce) hashes to a value that is lower than the target is proof that they have completed the necessary work.

You the man, Danny Ham!
Seriously though, your responses have been really to the point and helpful for noobs like me.

BTW, how can you run out of nonce values? Can't you just continue incrementing the number, or are you talking about the fact that a integer (or whatever the data type is) has a numeric limit?

You also said
Quote
Then they build a merkle tree from the chosen transactions and calculate the merkle root.

I'm curious if they mix up the routine to build this tree, as I would have just assumed it's a built-in function call in the software: like "BuildMerkleTree(transactions)" (where transactions is the list of selected transactions). I guess I'm curious as to how this tree is built. Wondering if there are any performance advantages (ie speed) to building it in a certain way versus using a canned function. 




16  Bitcoin / Development & Technical Discussion / Re: Choosing Transactions on: December 06, 2017, 12:19:06 PM

The solo-miner (or mining pool) typically runs software that makes the decisions.  They can often configure that software in any way that they like.
In the case of Bitcoin, they are required to include AT LEAST one transaction (the transaction that pays the block reward).  Beyond that they can include as many or few valid transactions as they like as long as they don't exceed any size limits on the block.

When you say "(the transaction that pays the block reward)", does the miner create this transaction himself?

So, based on your answers, it sounds like miners around the globe are independently adding transactions to blocks first, THEN, they start working on the proof of work,  correct? This is probably the only sane case because doesn't the POW depend on the transactions in the block itself? 

17  Bitcoin / Development & Technical Discussion / Re: Thoughts on this private key stealing mystery on: November 30, 2017, 12:45:22 PM
Wow  Shocked

Amazing discovery of a amazing coup. The guy who made this and the guy which discovered it are pure genious.

I am really excited to find out in which priv key generation code this thing is implemented.


Actually, what's most alarming about this is that the programmer that discovered this appears to be simply a solid developer (not a genius).  His thinking and experiments are logical and repeatable (by others without knowing). 

Is it possible to create a similar "capture" program that simply captures and returns the btc back to the sender, along with some sort of message that can be used to flag the transaction? This way, over time, it will be easier to determine the source of the code.
18  Bitcoin / Development & Technical Discussion / Re: Unconfirmed transaction for 160+ hours on: November 23, 2017, 04:49:22 PM
Is there another tool where I could resend the transaction with a higher fee?

The best would be to use replace-by-fee but you have probably not done it.

I you own the output  1PyMz5LU7oGUeJwsanh3SGKPkc2vm66ntr, you can do "child pays for parent" https://bitcoin.org/en/glossary/cpfp. You spend from
1PyMz5LU7oGUeJwsanh3SGKPkc2vm66ntr  to another address you own and pay a large enough fee. The miners cannot confirm the child without confirming the parent so in order to grab the new fee, they have to confirm the parent transaction. The new transaction (1 input, one output) will be 192 bytes, so two transaction will be 10094+192=10286 bytes. You paid  41830 satoshi in fees. If you pay now a 100000 satoshi fee, these two transaction will be 141830/(10286)=13.78 satoshi/byte. Still not a lot, it will take many hours or days to confirm (but it would have been instant 1-2 days ago). If you pay 1,000,000 satoshis (0.01 BTC), the combined fee will be 1041830/10286=101.28 sat/byte which should get confirmed immediately (even 60-70 sat/byte should be fine now). See, the current mempool statistics:
https://core.jochen-hoenicke.de/queue/#2d
But 0.01 BTC is quite a lot. Your choice. During weekends, there are usually less transactions and mempool is usually emptier and the running fees are lower. Last weekend it was 5 sat/byte so your original transaction was very close.  But nobody knows how full the mempool will be.


I think the OP is the sender, not the receiver. So, might not have control over that output. But this is good info on CPFP nonetheless.
19  Bitcoin / Development & Technical Discussion / Re: Setting up a Private Regression Test Blockchain with Bitcoincore on: November 13, 2017, 11:25:38 AM
Why don't you just install Bitcoin Core instead of trying to build from source? You can then run it in regtest mode.
20  Bitcoin / Bitcoin Discussion / Re: Simple bitcoin core tutorial on: November 05, 2017, 03:30:50 PM
The title says "Part 6"  - Is there a Part 1 through 5? 

In general, anyone trying to walk through the code should understand the concept of "signals and slots". Specifically with Boost and QT's implementation of signals and slots:

http://doc.qt.io/qt-4.8/signalsandslots.html
http://www.boost.org/doc/libs/1_47_0/doc/html/signals2/tutorial.html

I didn't know any of this prior to attempting a code review, but realized quickly there are a lot of pre-reqs as a developer before you can dive in.

What I think would be useful would be for someone to just go through each RPC method and do a deep-dive in how it's implemented in Bitcoin Core.  For example, as users we might run "bitcoin-cli getpeerinfo" to view info about connected peers.  How does that look in the source code?


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