blockchain – How to find Z value of multisig transaction?

What you’re asking for is how to figure out what to sign for a multisig transaction.

Multisig is actually very close to this answer. There are a few subtle differences, however, so let me try to summarize step-by-step using the transaction as seen on the blockchain

Note that for each input, the actual hash to be signed is going to be different. Namely, you will need to fill in the redeem script for that input only and nulls for every other input. To illustrate, let’s figure out what you need to sign for the very first input.

  1. Transaction version: 01000000
  2. Number of inputs: 03
  3. Tx input #1 hash: fdb1fe0b4506f8d412f8498a0d747701bc5ed8c009e779ee670c82361c1d1dd5
  4. Tx input #1 index: 01000000
  5. Tx input #1 redeem script length: 47 (71 bytes)
  6. Tx input #1 redeem script: 522102cebf6ab580948d146b7cc771d8e646974349d3d7b11f3e03287d0997a477d3b921037ba651485b7a2cb222191eb64a55926e62bbabfe9b5ed2a9488aad547b20428252ae
  7. Tx input #1 sequence: ffffffff
  8. Tx input #2 hash: a614d26f1878078a00a3c296085576cd7e6361234ea82c865681041fcfdacea8
  9. Tx input #2 index: 01000000
  10. Tx input #2 redeem script length: 00 (nothing)
  11. Tx input #2 sequence: ffffffff
  12. Tx input #3 hash: d064d2f9cf9e5196a9d81dd87718c9cfbec97f3ccac7164946d956421597c7f1
  13. Tx input #3 index: 01000000
  14. Tx input #3 redeem script length: 00 (nothing)
  15. Tx input #3 sequence: ffffffff
  16. Number of outputs: 01000000
  17. Amount being sent to the first (and only) output: e068704600000000
  18. Output script length: 19
  19. Output script: 76a9142c76e6fdd1a81c902afa62e78ec71435708d9d9d88ac
  20. Lock time field: 00000000
  21. SIGHASH_ALL: 01000000

Now, if you double-sha256 these bytes you get:

9c4b551f37f4b383af9216045d80b2fcd4ed57bddca8df388ec29601cbd2a4f1

And indeed when you check against the embedded signature of that transaction, you can see that that is indeed the hash that was signed. Here’s a code sample to verify using the excellent btcd library written in go:

package main

import (
    "encoding/hex"
    "fmt"
    "hash"

    "github.com/btcsuite/btcec"
    "github.com/btcsuite/fastsha256"
)

// Calculate the hash of hasher over buf.
func calcHash(buf ()byte, hasher hash.Hash) ()byte {
    hasher.Write(buf)
    return hasher.Sum(nil)
}

// Hash160 calculates the hash ripemd160(sha256(b)).
func Hash256(buf ()byte) ()byte {
    return calcHash(calcHash(buf, fastsha256.New()), fastsha256.New())
}

func main() {
    x := "0100000003fdb1fe0b4506f8d412f8498a0d747701bc5ed8c009e779ee670c82361c1d1dd50100000047522102cebf6ab580948d146b7cc771d8e646974349d3d7b11f3e03287d0997a477d3b921037ba651485b7a2cb222191eb64a55926e62bbabfe9b5ed2a9488aad547b20428252aeffffffffa614d26f1878078a00a3c296085576cd7e6361234ea82c865681041fcfdacea80100000000ffffffffd064d2f9cf9e5196a9d81dd87718c9cfbec97f3ccac7164946d956421597c7f10100000000ffffffff01e0687046000000001976a9142c76e6fdd1a81c902afa62e78ec71435708d9d9d88ac0000000001000000"

    b, _ := hex.DecodeString(x)

    hash := Hash256(b)
    fmt.Printf("hash of thing to sign: %xn", hash)

    pubkeyStr := "02cebf6ab580948d146b7cc771d8e646974349d3d7b11f3e03287d0997a477d3b9"
    pubkeyStr2 := "037ba651485b7a2cb222191eb64a55926e62bbabfe9b5ed2a9488aad547b204282"
    pubkeyBytes, _ := hex.DecodeString(pubkeyStr)
    pubkeyBytes2, _ := hex.DecodeString(pubkeyStr2)

    p, _ := btcec.ParsePubKey(pubkeyBytes, btcec.S256())
    p2, _ := btcec.ParsePubKey(pubkeyBytes2, btcec.S256())

    fmt.Printf("pubkeys: %s, %sn", p, p2)

    sigStr := "3044022025332b6dabf11e493fbc62c93e7302c48666512e1cf88157c26176f4af6d064702201ee7ec25d0917244e514c402e8751f112dfd1bef2b22ec5e496fbafabb52bf010148"

    sigStr2 := "3045022100fa1f17bf59bee0ac33ae5f682711c5471c73a4aeb898aee218478289a4c7aa6e02207b40dfeae3fa4a50dc147bd42be40370d76a35d72c0b27b27c4ba2439a565fb901"

    sigBytes, _ := hex.DecodeString(sigStr)
    sigBytes2, _ := hex.DecodeString(sigStr2)

    s, _ := btcec.ParseDERSignature(sigBytes, btcec.S256())
    s2, _ := btcec.ParseDERSignature(sigBytes2, btcec.S256())

    fmt.Printf("sig: %sn", s)

    fmt.Printf("signature valid: %vn", s.Verify(hash, p))
    fmt.Printf("signature valid: %vn", s2.Verify(hash, p2))

}

You can do the same thing with input #2 and input #3 to get the hash that gets signed by changing #5 and #6 (combined) to be 00 and #10 or #14 in the steps above to be 47522102cebf6ab580948d146b7cc771d8e646974349d3d7b11f3e03287d0997a477d3b921037ba651485b7a2cb222191eb64a55926e62bbabfe9b5ed2a9488aad547b20428252ae

unconfirmed transactions – BTC payment sent and confirmed in blockchain but haven’t received in other wallet!

Help!! It was confirmed about 34+ times but this is the first time this has ever happened to me! Usually it’s a piece of cake or at least it’ll show up in my account as “pending” but I don’t see it as a deposit to my wallet AT ALL and it’s been over 6 hours. Plz help.

Transaction ID: 7e444a3d0c6425b72bb200d54fe9b85564bdac616b36da3ef81481571947f09c

Thanks in advance!
Celeste

blockchain – Online BTC wallet implemention with bitcoin-core

Stack Exchange Network


Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

chain reorganization – Rewriting the blockchain?

The main bitcoin blockchain (the chain that miners choose to work on) is the chain with the most proof of work (“heaviest” chain). Currently, the cumulative proof of work on the bitcoin main blockchain is about 2^94 hashes.

I have a few questions here:

(1) How is the cumulative proof of work on a bitcoin chain calculated? Are they calculated by checking the timestamps (and thus the difficulty)?

(2) Let’s say an adversary has an alien supercomputer he stole from Area 51. He uses this alien supercomputer to rewrite the entire bitcoin blockchain from the genesis block – by mining a private chain that is heavier than the current chain. Does the current bitcoin network have any method of defending against this kind of attack? (I know that checkpoints can prevent such an attack, but checkpoints are no longer in the current bitcoin protocol, as far as I know)

(3) What would be the consequences of a bitcoin blockchain rewriting attack? An instant crash in bitcoin price? Would bitcoin be essentially dead forever, or does the bitcoin network have a way to recover and go on?

blockchain – bitcoin block time after halving?

AFter halving, the reward goes down by 1/2, some miners may find it is unprofitable to mine thus shutting down their mining operation. however, the hash rate remains the same until the next difficulty adjustment which is every 2016 blocks (14 days approximately). Thus, the block time will increase > 10 mins per block until the next difficulty adjustment.

Blockchain using Confidential Transaction is it Prunable?

I would like to know whether old CT transactions in a blockchain can be pruned.
If yes, how is it done?

According to Greg Maxwell presentation, https://youtu.be/Twynh6xIKUc?t=2740
Cryptographic solutions break pruning

blockchain – Unable to make custom Bitcoin command

To add a new RPC, you need to write the function the implements it’s action, add the function to the dispatch table, and update bitcoin-cli‘s type conversion table.

At the bottom of the RPC file you added your function to (in this case, src/rpc/blockchain.cpp, you will see a table that has all of the RPCs in that file as well as some extra information about them like category, name, and argument names. Add your new RPC to that table.

Next, if your command has any arguments which are not strings, open src/rpc/client.cpp and add those arguments to the vRPCConvertParams list there. In that list, you give it the RPC name, the index of the argument that needs to be converted, and the name of that argument.

The World’s First 100% Decentralized Ethereum Blockchain Matrix Project – Cryptocurrencies Corner



Screenshot-2.png



FORSAGE





Earn Etherium +3176 Joined in the Last 24hours the World’s First 100% Decentralized Ethereum Blockchain Matrix Project





forsagelogo.jpg


How Easy is it to Earn Ethereum Through Forsage 
With the cryptocurrency market booming, the number of people joining the blockchain revolution seems to be increasing every day. Though this might be so that they can get the return on their investments on cryptocurrency and not for the groundbreaking technology that blockchain has to offer, the cryptocurrency world is trying almost everything to get more and more people interested in its agenda. 

With regard to this, many companies have resorted to incentivizing tasks and promotional activities to give their consumers a fraction of a specific cryptocurrency. Ethereum is the second most popular and lucrative cryptocurrency in the world right now; which is potentially predicted to surpass Bitcoin someday. 

The main idea behind blockchain is to set up a decentralized network that would need a large number of users. Nevertheless, Ethereum has joined forces with many online incentive programs to give a little taste of their cryptocurrency to the users who are still having difficulties establishing themselves in the crypto market. 
Forsage 
Unlike many other incentive programs, Forsage is based on a Smart Contract Crypto earnings structure. There are no time limits, incentive caps, or any sort of time-sensitive pressure related to this program. What’s better is that you do not need any prior knowledge about blockchain or cryptocurrency! 

This program enables you to earn long term residual income by simply providing a referral to 3 or more friends, and asking them to follow the same process. In a way, this is a type of marketing program that is associated with Ethereum. Since it is based on the ‘Smart Contract’ structure, it cannot exploit any user. 
What is a Smart Contract? 
Smart Contract is a developed blockchain technology that involves an automated digital contract of sorts, which is unbreakable and unchangeable. One of the best features of this automated blockchain is that even if the host i.e. Forsage closes its website or shuts you out of it, the blockchain will still register you as an active participant and will constantly reward you for the efforts you put in. 

So, the chances of you being scammed are negligible. Also, this program was intentionally inclined towards a marketing and network marketing niche. This gives an advantage to people who have prior experience in marketing. Because of its overall technology, scams and fraud are practically non-existent. 
How do I Join? 
To join Forsage, you would initially need to pay a one-time payment of 0.055 Ethereum, which is less than $10.00 USD for registration. Once you set up an account and start referring to friends and the cycle continues to expand, you will see the funds in your crypto wallet increase. 

Forsage works with one of two major wallets. This again depends on which medium you use it on. Either Trust works best for mobile, tablets, and laptops and Metamask works best for computers and rigs. 
Conclusion 
Forsage is indeed the new wave of incentivized network marketing. The Smart Contract structure makes it scam-free, giving crypto network marketing a revolutionary and much-needed change. Being a blockchain entity, privacy and security are at the top priority of Forsage and the inexpensive initial fee is literally and figuratively a small price to pay. So, what are you waiting for? Go get that Ethereum! 

Join Forsage Today https://forsage.io/i/971neo


screencapture-forsage-io-i-971neo-2020-0


 

blockchain – Fee replacement issue – Bitcoin Stack Exchange

& # 39; Replace with rate & # 39; (RBF) is a method of increasing the fee rate for a transaction not yet confirmed. As a user, if you submit a transaction and then realize that the rate has been set to low, you can use RBF to create a replacement transaction that includes a higher rate, hoping for faster confirmation.

In this case, it appears that there was a transaction enabled with RBF that paid those funds to the 18dC... address mentioned in your screenshot. Otherwise, this transaction would be a normal bitcoin transaction, which has only the & # 39; RBF indicator & # 39; enabled. so that it can be replaced if the user so wishes.

If you didn't create this transaction, you should consider the fact that the machine your bitcoin wallet is running on is infected with some kind of malware. Without further information, it is not really possible to say with certainty what happened here.

blockchain.info – Authentication error with Blockchain Wallet API

I successfully integrated the blockchain-wallet-api into an application which is currently on production. The challenge I’m having is that even though I was able to disable email login authentication from my wallet settings and added the shared hosting ip to ip whitelist, I still get the error

Array ( (error) => Wallets that require email authorization are currently not supported in the Wallet API. Please disable this in your wallet settings, or add the IP address of this server to your wallet IP whitelist. )

I don’t know what else to do.