Posts

What is the purpose of addr_from and addr_recv in version message?

What is the purpose of addr_from and addr_recv in version message? I understand from this answer the semantics of addr_from and addr_recv. It is not clear to me though what is their purpose. Don't we assume that the transport layer protocol takes care of, well, transport? What happens if I send a version message where the information addr_from or addr_recv is missing or incorrect? E.g., in this answer the example code includes the following: addr_recv = struct.pack("Q", 0) addr_recv += struct.pack(">16s", "127.0.0.1") addr_recv += struct.pack(">H", 8333) addr_from = struct.pack("Q", 0) addr_from += struct.pack(">16s", "127.0.0.1") addr_from += struct.pack(">H", 8333) If that works, why include anything meaningful in those fields? https://ift.tt/2G7LlAJ

Problem mining Dash clone

Problem mining Dash clone First of all I want to clarify that I don't want to create another dash altcoin clone, I want to understand the code and be able to modify it for educational purposes. I cloned the dash's code, I removed all hardcoded ips and I removed all checkpoints and leave just one checkpoint (the genesis). I could compile the code without problems and I also could start two nodes. So far no problem, my problem comes when I try to mine some coins; for that I tried to do solo-mining from the debug console in the following way "setgenerate true" and getmininginfo returned that I the flag was activate but it doesn't mine nothing... I also checked the debug.log but it isn't much information there, last logs have different messages like the following but with different ids: 2018-03-25 23:13:29 CMasternodeSync::ProcessTick -- nTick 25 nRequestedMasternodeAssets 0 nRequestedMasternodeAttempt 0 nSyncProgress -0.250000 I was reading several guides and ...

generate wallet addresses from extended public key

generate wallet addresses from extended public key i am trying to generate addresses from Extended Public Key using bitcoinj but can't figure out, how can i possibly do this. i need those addresses for watch-only wallet, those addresses were unsigned, right? further i can sign those addresses for sending transaction. https://ift.tt/2GbW0X5

Different coin pools in zcash

Different coin pools in zcash I would like to understand the cryptocurrency zcash a little bit better... My understanding of it is that there are two address types t-addresses and z-addresses. Only transaction between two z-addresses are fully private. Transactions between t-addresses are working as transactions in bitcoin, i.e. the degree of privacy is exactly the same. Also there are two different pools: shielded pool and unshielded pool. My questions: Zcash is based on a base currency. As far as I know it is bitcoin, right? I guess the coins in the shielded pool are zcoin, right? How about the unshielded pool? Are they bitcoins or zcoins? (i.e. the marketcap of zcoins consists only of the coins in the shielded pool or both pools? Thanks a lot for any kind of help! https://ift.tt/2I3UIxN

How to calculate value of pair but in opposite direction

How to calculate value of pair but in opposite direction I am new to trading so my question might seem obvious or stupid to some but here goes. Exchanges often quote crypto pairs in a specific order, i.e. ETH/BTC but not very often (if at all) BTC/ETH. Also XRP/BTC but not BTC/XRP. What if someone wants to buy BTC by selling XRP or ETC. Is it possible? If yes, how is that value calculated? e.g. looking at ETH/BTC on Binance today the value is $8,101.82. What if I want to buy BTC from ETH (i.e. BTC/ETH), how do we calculate that value given the prices an exchange gives on ETH/BTC? Thank you. https://ift.tt/2I4XdQJ

How does LN solve the liquidity problem?

Image
How does LN solve the liquidity problem? How do nodes in LN manage to provide 100% collateral to all the outgoing channels? I attached an example below that details my confusion about the lack of liquidity. https://ift.tt/2pGRoBm

Is pre-image attack useful for mining?

Is pre-image attack useful for mining? I know that SHA256d is strong enough and it's not likely that will be broken soon but let's say someone knows how to find pre-image. The adversary chooses random hash starting with n zeroes (less than target) and finds pre-image (valid block header), let's say 100 times faster (I know it is possible only in theory) than he would need to do this by mining in classic way. What are the benefits that he gets? I think that he can mine faster, so it is easier for him to acquire over 50% of the network hashrate. He can also modify last n existing blocks to remove his transactions (double spending) and create longer blockchain that will be accepted widely in the network. Am I right? Second but related question. Let's assume we use 8 bit hash function. Is it easier to find pre-image for hash that has to start with 4 zeroes than excatly the same hash? I mean, is finding pre-image for hash 0000xxxx easier than for example 01010101? In the fi...