text:
Difference between pprev and pskip pointers in the CBlockIndex class?
In the Bitcoin Core there is class called CBlockIndex which as its name appears is the implementation of blocks. This class has two variable that for me they looks the same:
class CBlockIndex
{
public:

    //! pointer to the index of the predecessor of this block
    CBlockIndex* pprev{nullptr};

    //! pointer to the index of some further predecessor of this block
    CBlockIndex* pskip{nullptr};

The first one (pprev) is more straightforward and I understand it. It is simply a pointer to the previous CBlockIndex object in the chain. But the second one is not clear for me. What does the comment means by pointer to the index of some further predecossor? What it actually is and what are its use cases?


text:
What is the difference between chain and chainman in the NodeContext in the Bitcoin Core?
In the NodeContext structure there are two members named chainman and chain. chainman
is instance of ChainstateManager and chain is instance of interfaces::Chain. What is the differences between these two? What is the differences and why do we need both?
//! NodeContext struct containing references to chain state and connection
//! state.
//!
//! This is used by init, rpc, and test code to pass object references around
//! without needing to declare the same variables and parameters repeatedly, or
//! to use globals. More variables could be added to this struct (particularly
//! references to validation objects) to eliminate use of globals
//! and make code more modular and testable. The struct isn't intended to have
//! any member functions. It should just be a collection of references that can
//! be used without pulling in unwanted dependencies or functionality.
struct NodeContext {
    //! libbitcoin_kernel context
    std::unique_ptr<kernel::Context> kernel;
    //! Init interface for initializing current process and connecting to other processes.
    interfaces::Init* init{nullptr};
    std::unique_ptr<AddrMan> addrman;
    std::unique_ptr<CConnman> connman;
    std::unique_ptr<CTxMemPool> mempool;
    std::unique_ptr<const NetGroupManager> netgroupman;
    std::unique_ptr<CBlockPolicyEstimator> fee_estimator;
    std::unique_ptr<PeerManager> peerman;
    std::unique_ptr<ChainstateManager> chainman;
    std::unique_ptr<BanMan> banman;
    ArgsManager* args{nullptr}; // Currently a raw pointer because the memory is not managed by this struct
    std::unique_ptr<interfaces::Chain> chain;
    //! List of all chain clients (wallet processes or other client) connected to node.
    std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients;
    //! Reference to chain client that should used to load or create wallets
    //! opened by the gui.
    interfaces::WalletLoader* wallet_loader{nullptr};
    std::unique_ptr<CScheduler> scheduler;
    std::function<void()> rpc_interruption_point = [] {};

    //! Declare default constructor and destructor that are not inline, so code
    //! instantiating the NodeContext struct doesn't need to #include class
    //! definitions for all the unique_ptr members.
    NodeContext();
    ~NodeContext();
};

My assumptions are:

ChainstateManager manages Chainstates which are m_ibd_chainstate and m_snapshot_chainstate.
Chainstate has all data of a chain.

While interfaces::Chain is used for external components such as wallet, the only possible reason that comes to my mind is that the chain member is for external users of bitcoind. And by this fact, the implementation of interface::chain must be only a simple wrapper over the ChainstateManager, because I think all logic is implemented there.

While interfaces::Chain is used for external components such as wallet, the only possible reason that comes to my mind is that the chain member is for external users of bitcoind. And by this fact, the implementation of interface::chain must be only a simple wrapper over the ChainstateManager, because I think all logic is implemented there.

Yes. Bitcoin Core has many internal interfaces that are meant to be independent. According to the documentation, interfaces::Chain is used by wallet to access the node's latest chain state. The goal of the interfaces is to not require node, wallet and GUI to run in the same process.

ChainstateManager manages Chainstates which are m_ibd_chainstate and m_snapshot_chainstate.

Correct. It's an interface to create and interact with two chainstates (an IBD chainstate generated by downloading blocks, and an optional snapshot chainstate loaded from a UTXO snapshot).

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Can someone explain what exactly is derived address?
Let's say my mnemonic words are

army van defense carry jealous true garbage claim echo media make
  crunch

When I used https://iancoleman.io/bip39/#english, the section, Derived Address, showed me a lot of addresses. Among them, I found an address that my wallet showed, but the address would change time to time?
Why does my address change?
I understand that Derived Address are children of Account Extended Private/Public Keys, but why isn't my wallet showing me all of those addresses that I can use?
What is the maximum number of Derived Address for m / 44 / 0 / 0 / 0 / * ?
Are all the address valid and working? Meaning, can I send a payment to any of the address from the Derived Address and will I still get the cryptocurrency?
If I import any listed Derived Private Key to another wallet, can I use the funds in there?

Your address does not change. Probably your wallet is showing you only those addresses that have non-zero balance. It is called derived addresses because they are generated iterating over the index number according to the BIP-44 derivation.

What is the maximum number of Derived Address for m / 44 / 0 / 0 / 0 / * ?

That is capped by the index number, which is 32 bits. So you will be able to generate 4,294,967,296 addresses. However, the the first 4,294,967,296/2 = 2,147,483,648 are reserved for non-hardened derivation and the other half is reserved for hardened derivation.

Are all the address valid and working? Meaning, can I send a payment to any of the address from the Derived Address and will I still get the cryptocurrency?

Yes, if you control the private key related to the address, you control the bitcoins sent to that address. Using the seed words, any decent wallet would be able to generate addresses using the BIP-44 derivation and the private keys that control them.

If I import any listed Derived Private Key to another wallet, can I use the funds in there?

Private keys derived from the extended private key is no different from other private keys. So if you import that private key into a wallet, you will be able to control the funds sent to the address generated from that private key.

Maybe saying that "they change" is a bad way to put it. Time to time, when I look at the request address, the address "change" within the Derived Address pool. Is that normal?

Yes. Using a different index number will generate a completely new address. Once a transaction is made to any receiving address, your wallet will keep a note of it so that it can be used to spend funds

But as a user, I'm not exposed to which receiving address has fund in it because the wallet takes care of the micro details, is that right?

@CarolWard Also the derivation path you have cited m / 44 / 0 / 0 / 0 / * ? is non-hardened. Wallets will use a hardened derivation path m/44'/0'/0'/0'* to prevent leak of extended public key if a child private key is known.

@CarolWard Yes, any decent wallet takes care of those details. It scans the blockchain for funds sent to the addresses.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How are interfaces used and work in the Bitcoin Core?
There is a directory called interfaces. I've seen usage of interface classes in other places but never understood how do they work because they're trivially just an interface and therefore do nothing by their own. Can someone explain the mechanism they work in the code?

The interfaces classes just provide API definitions.
For example the interface::Wallet class declares a virtual interfaces::Wallet::getWalletTxs() method that GUI code can call to list wallet transactions. Wallet code provides a wallet::WalletImpl class that inherits from interfaces::Wallet and provides a wallet::WalletImpl::getWalletTxs() implementation of that method.
Because of the interface definition, GUI code can call the wallet code through the interface without being linked to wallet code or even necessarily running in the same process.

I think these interfaces are exclusively used in the running of Bitcoin Core in multiprocess mode (1, 2). When running Bitcoin Core as a single process (which is the default mode) these interfaces aren't used. However, multi processes need a way for a process to communicate with another process and this is done through these well defined interfaces.

That's not correct. They're used right now already for interaction between various components (though the goal of this is having a unified interface between components, so that later those components may end up running in different processes).

Ok I'll wait for your answer on this then. Feel free to downvote this :)


text:
My bitcoin is in a platform where their website is down
I have a question and looking for advice on what to do.  My bitcoin is stored in an account called Aptimarket.  The website for this company is in a redemption list.  Their domain is now under Namecheap.  I contacted Namecheap and was informed that Aptimarket is in a redemption list and might be deleted soon.  My bitcoins are in an account with Aptimarket and not able to get to my account.  I am concerned about this as where are the he bitcoins?   I’m sure I’m not the only customer who has an account with Aptimarket.  I can’t get into my account because of Aptimarkets website not active.  Any help on this or any information would be appreciated. Thank you.  Rose

While not personally familiar with this site, it's marked on multiple scam tracking sites as fraudulent. That means that more than likely you fell victim to a cryptocurrency scam, and your funds may be forever lost. You probably should consult above link and local law enforcement to see if there any legal measures you can take.

What are the scam tracking sites you checked this company on?


text:
In which situation the fee rate can be negative and what does it really mean?
Here in the definition of CFeeRate class is a member called nSatoshisPerK:
/**
 * Fee rate in satoshis per kilovirtualbyte: CAmount / kvB
 */
class CFeeRate
{
private:
    /** Fee rate in sat/kvB (satoshis per 1000 virtualbytes) */
    CAmount nSatoshisPerK;

And its job is obvious according to the comment above. This class has also a member called GetFee:
CAmount CFeeRate::GetFee(uint32_t num_bytes) const
{
    const int64_t nSize{num_bytes};

    // Be explicit that we're converting from a double to int64_t (CAmount) here.
    // We've previously had issues with the silent double->int64_t conversion.
    CAmount nFee{static_cast<CAmount>(std::ceil(nSatoshisPerK * nSize / 1000.0))};

    if (nFee == 0 && nSize != 0) {
        if (nSatoshisPerK > 0) nFee = CAmount(1);
        if (nSatoshisPerK < 0) nFee = CAmount(-1);
    }

    return nFee;
}

My question is that in which case it is possible for the nSatoshisPerK to be less than zero? and what does it mean?

It is not possible for the feerate to be less than 0. It would mean that the outputs have more value than the inputs, which means that Bitcoin is being created from thin air. Such a transaction would be invalid and it is not possible to have negative feerates.
In this context, a negative value indicates that the feerate is uninitialized or otherwise invalid.


text:
What is the difference between minRelayTxFee and rollingMinimumFeeRate?
CTxMemPool has a member named rollingMinimumFeeRate:
    mutable double rollingMinimumFeeRate GUARDED_BY(cs); //!< minimum fee to get into the pool, decreases exponentially

The comment explains that it is the minimum fee to get into the pool. But we have another variable in the code base called minRelayTxFee:
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);

/** Default for -minrelaytxfee, minimum relay fee for transactions */
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;

Two questions:

What is the difference between these two variables? and which is for what use cases?

Why the rollingMinimumFeeRate decreases exponentially?

What is the difference between these two variables? and which is for what use cases?

rollingMinimumFeeRate is the minimum feerate for a transaction to be added to the mempool and be further relayed. This is a dynamic value - it changes as the mempool fills up and empties.
minRelayTxFee is the absolute minimum feerate. It is a static value. rollingMinimumFeeRate starts with the value of minRelayTxFee and it increases when the mempool becomes full. As the mempool empties and rollingMinimumFeeRate decreases, it will not decrease to be less than
minRelayTxFee. (This is effectively what happens, not actually what the code does.)

Why the rollingMinimumFeeRate decreases exponentially?

rollingMinimumFeeRate increases when the mempool fills up. Transactions that have a feerate less than this value are evicted from the mempool. It is increased in order to maintain a maximum mempool size - if the mempool is larger than the maximum, the lowest feerate transactions are evicted until the maximum size is reached, and rollingMinimumFeeRate is set to the highest feerate transaction that was evicted.
As transactions are removed from the mempool by blocks, there needs to be a way to decrease rollingMinimumFeeRate to allow lower feerate transactions back in. However because it does not have those transactions anymore, it does not know what value to set it to. So it walks backwards, exponentially, until it either reaches 0, or is increased again, then the exponential decreasing is reset.


text:
What is CCoinsCacheEntry in the Bitcoin Core?
CCoinsCacheEntry is implemented here.
/**
 * A Coin in one level of the coins database caching hierarchy.
 *
 * A coin can either be:
 * - unspent or spent (in which case the Coin object will be nulled out - see Coin.Clear())
 * - DIRTY or not DIRTY
 * - FRESH or not FRESH
 *
 * Out of these 2^3 = 8 states, only some combinations are valid:
 * - unspent, FRESH, DIRTY (e.g. a new coin created in the cache)
 * - unspent, not FRESH, DIRTY (e.g. a coin changed in the cache during a reorg)
 * - unspent, not FRESH, not DIRTY (e.g. an unspent coin fetched from the parent cache)
 * - spent, FRESH, not DIRTY (e.g. a spent coin fetched from the parent cache)
 * - spent, not FRESH, DIRTY (e.g. a coin is spent and spentness needs to be flushed to the parent)
 */
struct CCoinsCacheEntry
{
    Coin coin; // The actual cached data.
    unsigned char flags;

    enum Flags {
        /**
         * DIRTY means the CCoinsCacheEntry is potentially different from the
         * version in the parent cache. Failure to mark a coin as DIRTY when
         * it is potentially different from the parent cache will cause a
         * consensus failure, since the coin's state won't get written to the
         * parent when the cache is flushed.
         */
        DIRTY = (1 << 0),
        /**
         * FRESH means the parent cache does not have this coin or that it is a
         * spent coin in the parent cache. If a FRESH coin in the cache is
         * later spent, it can be deleted entirely and doesn't ever need to be
         * flushed to the parent. This is a performance optimization. Marking a
         * coin as FRESH when it exists unspent in the parent cache will cause a
         * consensus failure, since it might not be deleted from the parent
         * when this cache is flushed.
         */
        FRESH = (1 << 1),
    };

    CCoinsCacheEntry() : flags(0) {}
    explicit CCoinsCacheEntry(Coin&& coin_) : coin(std::move(coin_)), flags(0) {}
    CCoinsCacheEntry(Coin&& coin_, unsigned char flag) : coin(std::move(coin_)), flags(flag) {}
};

And is used in a map here:
typedef std::unordered_map<COutPoint, CCoinsCacheEntry, SaltedOutpointHasher> CCoinsMap;

I can't understand what is CCoinsCacheEntry by reading the code and comments. What does it mean by parent?

DIRTY means the CCoinsCacheEntry is potentially different from the
version in the parent cache.

Can someone explain what is it and how it is used? And also what does DIRTY and FRESH mean?

Bitcoin Core uses a hierarchy of "UTXO set views":

The on-disk database The UTXO database as it exists on disk
The global in-memory cache An in-memory cache with UTXOs that have been read from disk already, and ones that have been modified by recently-processed blocks. Occasionally the changes in this one are pushed to the on-disk database (=the parent), in a process called flushing.
The local in-memory cache An in-memory cache on top of the previous one that's local to the verification of one block. During processing of that block, the new outputs and spent inputs are accounted for in the local cache. If the block turns out the be invalid, the local cache's changes are just discarded. In case the block is valid, they get flushed to the global cache (=the parent). This avoids the need for a complex undo procedure in case the block turns out to be invalid.
Not really part of the hierarchy, but still worth mentioning. The mempool The mempool forms its own UTXO set, defined by the global in-memory cache, plus all outputs created by unconfirmed transactions, minus all outputs pent by unconfirmed transactions.

Each of these represents a distinct UTXO set. Note that they're just "views": they define some UTXO set, but they don't necessarily fully materialize it. E.g. The global in-memory cache does not actually store all UTXOs. It only stores the recently modified and looked-up ones; if another UTXO is looked up in it, it will instead query the parent cache (the on-disk database).
The global and local in-memory caches are instances of the CCoinsViewCache class. "The parent" is an abstract way of just saying the cache above it in the hierarchy. In the case of the global cache, the parent is the on-disk database. In case of the local per-block cache, the parent is the global cache.
The CCoinsCacheEntry is the data type of an actually materialized entry in a CCoinsViewCache. They have roughly speaking 3 properties in addition to the actual UTXO data:

Spent or not: does the UTXO still exist? (as in: is it a UTXO, or just a TXO). We can't just delete spent entries,because when a UTXO gets spent, we must remember that fact in the child cache, so that when flushing, we can remember to make the same change in the parent.
Dirty or not: has this entry been modified w.r.t. the corresponding parent? E.g. has is been spent, or created since? This is an optimization so that when unmodified entries exist in a cache, they can be skipped when making changes to the parent at flushing time.
Fresh or not: is this an entry that does not exist in the parent at all? This is an additional optimization: if we know a parent does not have an entry, and it gets created in the child, and then spent in the child, without an intervening flush to the parent, we can just delete the entry from the child, forgetting it ever existed. This is the most impactful optimization, as it means many (if not most) UTXOs don't actually ever get written to disk at all. They're just created in the global (or even local) cache, and spent immediately.

A few examples that may make things a bit more tangible:

An invalid block arrives (e.g. it has an invalid signature) which spends a very old UTXO O (e.g. a UTXO from one of the first block ever), and creates a new UTXO N. In what follows, I will only describe what happens with O and N; there are likely many more other UTXOs and cache entries around, but for simplicity I'm omitting them.

Initially: disk=[O] global=[]. O just exists on-disk, because it has existed forever. There is no CCoinsCacheEntry in the global cache for O (meaning its state is unmodified w.r.t. the on-disk cache). No local cache exists.
Local cache created: disk=[O] global=[] local=[]. The block is received, and validation starts. A local cache for just that block is created, which is initially empty.
O is looked up: disk=[O] global=[O:unspent] local=[O:unspent]. Processing operates on the local cache, and tries to spend O. The first step of that is actually looking up O, which causes the local cache to query the global cache, which doesn't have O either, so it queries the disk database. The result is then copied to the global and local caches. Both entries will be unspent (the UTXO still exists), non-dirty (no changes have been made), and non-fresh (the UTXO exist in their respective parents).
O is marked spent: disk=[O] global=[O:unspent] local=[O:spent,dirty]. In a next step, O is preliminarily marked spent in the local cache (which is necessary to e.g. catch a block spending the same UTXO twice). This causes the local cache entry to be marked dirty too, as there is a chance.
N is created: disk=[O] global=[O:unspent] local=[O:spent,dirty N:unspent,dirty,fresh]. Next, the transaction in the block that creates the N output is processed. This just causes that entry to be added to the local cache.
local cache is discarded: disk=[O] global=[O:unspent]. Script validation notices that the block is invalid, and the local cache with all changes is discarded. Note that the global cache still retains the O:unspent entry; this isn't actually a change w.r.t. before the block was processed, as it's just duplicating information from the disk cache.

Thanks for your complete answer! it helped me a lot understanding it. Are these on-disk and global in-memory cache respectively? (on-disk: https://github.com/bitcoin/bitcoin/blob/59e6828bb5b56a2354a80059d3f660f551f3e207/src/validation.h#L396, global in memory: https://github.com/bitcoin/bitcoin/blob/59e6828bb5b56a2354a80059d3f660f551f3e207/src/validation.h#L403

@AmirrezaRiahi Indeed, exactly!


text:
Difference between 2 way of serialization in the Bitcoin Core
This answer, explains what are SERIALIZE_METHODS and DESERIALIZE_METHODS macros in the Bitcoin Core. They prevent duplicate code for implementing the serialization and deserialization logic. But I've seen some classes in the Bitcoin Core which do the serialization differently. Here's an example:
/**
 * A UTXO entry.
 *
 * Serialized format:
 * - VARINT((coinbase ? 1 : 0) | (height << 1))
 * - the non-spent CTxOut (via TxOutCompression)
 */
class Coin
{

    ...

    template<typename Stream>
    void Serialize(Stream &s) const {
        assert(!IsSpent());
        uint32_t code = nHeight * uint32_t{2} + fCoinBase;
        ::Serialize(s, VARINT(code));
        ::Serialize(s, Using<TxOutCompression>(out));
    }

    template<typename Stream>
    void Unserialize(Stream &s) {
        uint32_t code = 0;
        ::Unserialize(s, VARINT(code));
        nHeight = code >> 1;
        fCoinBase = code & 1;
        ::Unserialize(s, Using<TxOutCompression>(out));
    }

So, what's the difference between these two way of implementing serializing and deserializing methods?

Nothing.
The SERIALIZE_METHODS approach lets one write the serialization and deserialization code at once, but it effectively is just a (possibly) simplified way of writing the Serialize and Unserialize functions.
In this example, the author of the code just chose to write those functions directly and separately.


text:
Ich habe bitcoin-qt auf neuen Computer installiert und komplette blockchain runtergeladen. Wie verbinde oder oeffne ich meine alte Wallet?
Ich habe bitcoin-qt auf neuen Computer installiert und komplette blockchain runtergeladen. Wie verbinde oder oeffne ich meine alte Wallet die auf alten Computer erstellt wurde?

Close bitcoin-qt
Copy your old wallet.dat file into the directory that contains the wallet.
If you installed with standard path, it will be:
c:\users\yourpcusername\AppData\Roaming\Bitcoin\wallets
just rename or delete the old wallet.dat file.
Restart bitcoin-qt. It will now rescan, this will take a few hours.

Hello, your answer was very good and the result was successfully. The rescan took 5.5h! Incredible! Thank you very much.


text:
I lost my wallet, can someone just help me with my investigation?
Im from Argentina, living in Spain, so im sorry for me english.
I will try to explain:
Back in 2013, i had a butterfly equipment...i bought one to resell in Argentina, and i did mining like few months, and i remember using a "pool" to do that.
I sold machine, forgot totally about btc, i even change my laptop many times....
2021: Im desperated for this covid problem, im inmigrant in foreign country and is really hard. So i tried to remember things...to search in my email...in my google activity...etc...etc
I found out the pool, was Bitminter, i realized was like not working, but i wrote to support and they answered to me right away, cause my hotmail adress was no longer valid !!
So they kindly attached my google account, and i logged in!
I saw just cents of btc....and i realize i had the option "pay out auto", and i can see the transactions made to my "wallet"....but i HAVE NO IDEA WHAT WALLET I USE....even what pc i was using .... i change pc all time... is so frustrating.

some kind soul with any idea? thanks a lot !!!

There is still about 1/6 of a bitcoin sitting in that address: https://blockstream.info/address/1KVCgW4yojgoP2j4RCADHNCKkND2VqteXA. Unfortunately, there is no way to find out what wallet you were using from the address. You can find a few pointers here: I have lost my wallet, what can I do?.  If it was a wallet on your laptop, it's probably lost. Maybe you used blockchain.info or a similar wallet? Then it might also be tied to your old email address, though.

Does this answer your question? I have lost my wallet, what can I do?

yes...i saw that post, i also thought could be blockchain, so i tried to log in, they said "email is not supported", but they give chance to put email to recover, and it seems my email (always the same since then) isnt attached.... but i do remember the wallet needed registration, but maybe my memory fails.... thanks a lot

If you're using your real name as your screen name, you should probably change it, especially since if you ever recover the bitcoin in the future, people will know you have it which can make you the target of malicious actors.

too many clues means no clue at all. there isn't no clue. you already said u changed laptop manytimes . just forget about. you can't dnothing without the backup.
but if you using some online wallet to receive that btc. you can search your email to see if there are record fromexchange or online wallets. this is the only chance. good luck.


text:
Two transactions are signed by different private keys, and the value of "R" for these two transactions is the same?
Everyone knows an error in the Blockchain when the same value of "R" can be calculated and find out the private key of the transaction:
ECDSA Signature and the "z" value
But I have a question. Can I find two private keys with the same value of "R"?
Can you please tell if you can get the value "K" if you know that two transactions signed different private keys, and the value "R" on these two transactions is the same?

Assuming the two private keys are unrelated, the answer is no.
The reason for this is simple: there are 3 unknowns (the two private keys, and the single secret k value), but only two equations (the ECDSA validation equation for both signatures).
If a relation is known between the two private keys (like one is twice the other, or one is one higher than the other, ..), another equation becomes known, and the system becomes solvable.


text:
How to check the balance of the list of 1 million Bitcoin Addresses?
How to check the balance of the list of 1 million Bitcoin Addresses? Is there such a program?

Insight Block Explorer is the program.   It has an API you can query.
You'll need to install the block explorer.  It runs in a nodejs environment.

Please tell me how to work with "Insight Block Explorer"?

It is a full stack application.   You have to enable zmq on your bitcoin node, and then the bitcore internals allow for fast access to blockchain data by it's API.
It's quite a lengthy process to install it.   The version I've used most recently requires nodejs v4 which is quite old.  Sorry I can't be much help - I use it with non-bitcoin environments (other blockchains).

You need to install a bitcoin full node, then create a program to scan from latest block to first block all the unspent outputs and keep in memory, maybe in something like Redis, the status of the balances of the addresses until you reach the 1 million you are looking for


text:
How to reach out the trader through the bitcoin address?
I am actually a person who keenly watching and wondering the growth of bitcoin in recent days, when I was looking for an alternative business plan one of an Instagrammer pinged me and checked my interest in doing forex trading, we used to communicate through WA, her number is given below
Though I had no prior experience she was ready to help me in forex trading,
Initially, Invested 200$ followed her instructions, my trade account has been created in "https://en.cryptsmarket247.com/public/" and my bitcoin wallet has been created in "Wazirx". not sure it was a scam but my trade account reached $780, and still it is showing the figure and unable to withdraw.
She was claiming that my account reached $10000k and I need to pay $250 as a migration fee to withdraw the money, I paid $250, and once paid she started telling me that the money has not reflected on her company account. I was asked to pay one more $250 not to lose the already paid $250 and the profit $10k.
As I was new to trade and bitcoin I trusted her and paid another $250. she told me I would be receiving $250 in 30 mins $10k in 3 days and left as usual, but, from today onwards I could not see her in WA.
I could see where the bitcoin deposited at her end but not able to do anything, I raised a complaint with FTC and reported the issue at "https://bitcoinwhoswho.com/", is there any way I could recover my money back or I could reach her with the below details?
Her mobile number
Mobile number : +1 (819) 800-6746, +1 (364) 202-6061
Bitcoin Address: 3R2XQzyAqbzCmAsDX4tEjX5bm3SmusKym2
Her image attached (she claimed that she is the one in the image)

I am sure she is not a techie, so there any way I could block her bitcoin address?
any idea on the website I have given "https://en.cryptsmarket247.com/"
Someone, please help me!
Regards,
Raaamuz

Sorry, you lost your money. It's doubtful the scammer gave a real photo, and there's no real way to find the person based on a bitcoin address. Just learn from this lesson.

Yes! I lost my money, she didn't come back


text:
Why don't bitcoin nodes invalidate new blockchains that don't contain all the data of the old blockchain?
If nodes only accepted new valid blockchains that contained all the data of the old blockchain, then miners will still be able to add blocks to the current blockchain because their blockchain will contain all the data of the old blockchain and the additional data of the new block.
However, double spending will become virtually impossible because if a malicious miner rewrote the blockchain and completed the proof-of-work so they can double-spend, they will be unsuccessful because nodes will only accept blockchains that contain all the data of the old blockchain. A blockchain with a double spend in it will not contain all the data of the old blockchain as it will not contain the double-spenders transaction, so why was this not programmed into the bitcoin protocol?

Does this answer your question? Why does Bitcoin no longer have checkpoints?

I've voted leave open, since the topics are similar but not close enough related to be duplicates.

The problem with this proposal is that it relies on data that is external to the blockchain (namely, data that is in another branch of the chain).
The validity of a block should be a function only of its contents, and the contents of anything the block commits to through hashes. Specifically, that includes all ancestors of the block, as the block header contains the hash of the parent block, and so on. This means that nodes can independently determine validity, without needing assumptions about what data is available to whom.
More concretely, your proposal has the following problem: there is no "initial" chain, and "replacement" chain. Some nodes will see one first, and others will see the other first. This happens normally, when a single-block fork appears due to two blocks at the same height being found approximately simultaneously. It also happens during initial synchronization with the network: a node could be connected to an attacker who provides a rewritten chain first, and only later connects to an honest node that gives the "real" chain.
In both these cases, the rules must be so that eventually all nodes agree on which chain is the real one, or at least the probability for disagreements to remain should decrease over time.
If you require that a replacement chain contains all transactions the original chain has, then nodes who saw "the other" chain first will always reject the real one, as from their perspective, it is the real chain that is trying to replace the chain they already had.
And as forks occur naturally, this would be a disaster: if two blocks are created at the same height, with different transactions (as there cannot be any guarantee that two miners in different geographical locations have identical mempools; this is simply a result of the finite speed of light), nodes that see block A first will reject B as an invalid replacement, and nodes that see block B first will reject A as an invalid replacement. The result would simply mean that any network fork becomes permanent, and the network no longer converges.


text:
If there was an easy way to check for double spends, will consensus algorithms be needed?
Currently, checking for double spends is very computationally expensive, so consensus algorithms, like POW, were put in place to more easily prevent double spends among other things.
Ignoring the fact that a consensus algorithms allows for other essential things to be done, like making sure that new cryptocurrency can only be mined at a fixed rate; if there was a way to very efficiently detect double spends in an incoming blockchain and the protocol was changed so it will reject a blockchain that has double spends and it will accept accept a blockchain with no detected double spends, then will there be no need for consensus algorithms?

Yes, if you assume that the central challenge of a distributed system in an antagonistic environment doesn't exist, hypothetically creating such a distributed system is indeed much easier!

Currently, checking for double spends is very computationally expensive[…]

Detecting doublespends is trivial. You just need to recognize that two transactions are in conflict because they spend the same funds.
The actual challenge of the doublespending problem is to get a network of equal peers to converge on one canonical transaction order. In fact, Bitcoin's most notable achievement is to propose a practical solution to the doublespending problem.

the protocol was changed so it will reject a blockchain that has double spends and it will accept accept a blockchain with no detected double spends, then will there be no need for consensus algorithms?

So, sure, if you assume that there unexplainedly is already consensus on how to solve the principal problem of operating a decentralized currency system, you no longer need to figure out how to achieve consensus. However, that's not a particularly useful starting point.

What do you mean when you say, "not a particularly useful starting point"?

The entire reason for the existence of PoW is because it solves the consensus problem - as consensus is needed to prevent double spends. If your assumption is that you already don't need that, and thus already have a consensus system, there is indeed not much interesting to build anymore.

PoW is merely a "thing to agree upon".  You can choose any arbitrary thing or system to agree upon.  Time, for example.  Television programming line up.  Sports scores.  Bus schedule. Humidity fluctuations.  Stock market changes.  Or, anonymous electronic transactions. If you remove the money/greed aspect then it becomes waaaay easier to mitigate double transactions ("spends").
Think of a chatroom for example.  That meets all the previously mentioned descriptors. Anonymous, electronic transactions of low monetary value.  Now then, everyone participating in the chat room records an identical copy of all the transactions, right? So imagine if each time you reply to a specific user, you increment a unique sequential index.  So to the recipient it looks like this: From Satoshi: @CCS hello fren!  (Index #42)
Then when you reply to them the index is incremented, so they see from you: From CCS: @Satoshi long time no see, fren!  (#43)
Since this little chain of incremental identifiers consists of only two parties, they will never run into many of the problems in an adversarial network.  Each participant knows what next index is expected and if a message appears that deviated from that, everybody will know there is a problem.
Here we see everyone transacting independently without a third party and they are able to verify the order of transactions.  If the transactions additionally included a sum (chksum), then each transaction would also be able to verify immutability.  (error correction)
If one of my messages to you contains a PGP encrypted message containing my credit card number and a purchase order, then I have sent you an electronic funds transfer on a public distributed verifiable share ledger that involves no wasted PoW or mining nonsense.   []


text:
bitcoin-etl: problems with installing
I am trying to install bitcoin-etl: https://github.com/blockchain-etl/bitcoin-etl to analyze bitcoin blockchain.
I have Mac OS and python3, I run this in terminal:

pip install bitcoin-etl

Also tried this:

python3 -m pip install bitcoin-etl
The output is:
ERROR: Could not find a version that satisfies the requirement bitcoin-etl

ERROR: No matching distribution found for bitcoin-etl

I have python3 and pip installed:
python3 -m pip --version
pip 21.0.1 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
Any suggestions?
Thanks!!!
P.S. BTW, if you know any other ways to analyze bitcoin blockchain (I need csv for block counts vs time) your advice would also be very appreciable!

I can reproduce on macOS again, open an issue here https://github.com/blockchain-etl/bitcoin-etl/issues

Done! https://github.com/blockchain-etl/bitcoin-etl/issues/48. Thanks!


text:
What if all transactions are off-chain in Bitcoin?
As we know, there are several off-chain solutions called payment channels in Bitcoin. The users can move off-chain their transactions and maintain a local ledger themselves. They only need to turn to the global chain when a dispute happens or some channel is exhausted. And moreover, the payment network can organize the payment channels together so that users with no direct channels can also perform off-chain payment. The network also brings the opportunity to recover the exhausted channels with off-chain method by adjusting the balance among the channels.
So I have the following questions:
(1) Is it possible to move all transactions off-chain? I think it is possible for the following reasons. Firstly, no one will cheat from the perspective of game theory, so no dispute will happen. Secondly, no channel will exhaust with the off-chain recovering method.
(2) If not, what prevents it from happenning?
(3) If it is possible, what if all transactions move off-chain? I can imagine that if no transactions are on the blockchain, the the blockchain will disappear even when it is still exists. We no longer need to maintain it. Then what it brings to this world?

I agree that a future could emerge in which most payments will be handled offchain. Whenever you want to pay someone and it can't be done via lightning you could just open a payment channel for that amount and keep it open. I also assume cheating won't be too much of an issue and people have strong incentives to keep channels open as the bitcoin are much more liquid on there.
However channel openings and closing will still be a thing thus the bitcoin base layer won't become obsolete and still needs to be maintained. Also some rebalancing is not possible off-chain.
I think in the scenario the bitcoin base layer becomes the institution enforcing the rules of the Lightning Network but it will just be too expensive to do transactions regularly on the baselayer.


text:
Stratum: How many shares should I submit per job?
I'm implementing a bitcoin CPU miner just for fun in python. I've been reading a lot about bitcoin and the protocol pools use for communication and coordinating workers but there is a key concept I haven't explicitly found.
The problem (Stratum v1)
Jobs keep coming to the worker(which I store in a FIFO), and provided clean_jobs is set to false, when should I get to the next job? With nonce, extranonce, and version and time rolling seems like I would never need to change job(even with the fastest of ASICs). Or is it that once I found a share for a given job I must submit that only one share and proceed to the next job?
Once a share is found for a given job, should I keep mining it? Until when? Or should I submit that only one share for that job and proceed to the next job?
I'm guessing it is the latter, as the server can adjust the difficulty to prevent me from finding shares too fast(or too slow)
I would appreciate it if you added a source if possible(so I can learn more and see what else I've missed).


text:
How is the Max Target of a Genesis Block Decided?
I've been diving into the world of Blockchain and crypto lately, trying to build my understanding of mining specifically. I understand that in POW systems, the difficulty of the first block is 1, and the current difficulty can be seen as being "current difficulty multiples harder than the first block" to mine (aka it scales linearly).
What I've been having a hard time figuring out, though, is how the designers of POW systems settled on the maximum target for their first blocks. To quote another stackoverflow answer:

Satoshi decided to use 0x1d00ffff as a difficulty for the genesis block, so the target was 0x00ffff0000000000000000000000000000000000000000000000000000.

This leaves me with a few questions:

Is there a reason to why Satoshi picked this number specifically?
How does this relate to other cryptos?
Is the max target fairly arbitrary so long as the designer is careful not to pick a max target that's too low?
(3b) If so, does the max target not matter in the same way after the first re-target (i.e., after the first 2016 blocks in bitcoin's case)?

My reasoning for asking this question is because when I look at the difficulty charts for cryptocurrencies, I've been curious if they're relatable to one-another, that is, if you could reason that because BTC has a difficulty of X and LTC has a difficulty of Y, you could determine which to mine based on difficulty and block reward alone.

It's important to note that "difficulty" as such doesn't actually exist in the system; it's just a convenient way of representing the target value for human consumption. Internally (and on-chain) only the "target" and "nbits" representation are used.
Furthermore, the actual difficulty for the genesis block doesn't really matter, except for the fact that at least in Bitcoin it also happens to be the maximum permitted target value. And that value is relevant.

We don't know how or why Satoshi picked the specific value of 65535×2208 as maximum target. But perhaps they measured the speed of mining on their own system/implementation, and chose a nice round number (in nbits representation) corresponding to what they estimated would be reasonable for the operational network.

Not sure what you mean. Questions about specific altcoins are off-topic here.

Yes, probably.

Well, in Bitcoin the genesis's difficulty is also the minimum difficulty a block can have, and early on in Bitcoin's history, there were many retarget periods where the difficulty was just 1, because the hashrate wasn't sufficient for a higher difficulty.

My reasoning for asking this question is because when I look at the difficulty charts for cryptocurrencies, I've been curious if they're relatable to one-another, that is, if you could reason that because BTC has a difficulty of X and LTC has a difficulty of Y, you could determine which to mine based on difficulty and block reward alone.

You cannot compare hashrate of unrelated proof-of-work functions. They require separately-designed hardware, so one cannot be converted into another once you get out of the realm of general purpose (CPU & GPU) hardware.

Regarding 4., it may be worth mentioning that the slightly higher minimum effort may have been picked to slow down initial supply distribution.


text:
When should proof-of-work be done? Does it involve in mining a coin? Can it be done without real transactions to be recorded?
I am trying to understand about what bitcoin is. I conceptualize bitcoin as a proof of work required when a new block (or new coin) is created. I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed. (please correct me if my understanding is wrong).
Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself and the transactions chosen, the previous hash, and other relevant items are hashed all together? If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred? If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions? If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes. I am sorry for the dumb questions, but please help me to understand these fundamentals right. Thank you very much!

Here's a resource about Nano which is a cryptocurrency that requires PoW for every transaction : https://www.reddit.com/r/nanocurrency/comments/gxwbxu/how_exactly_does_the_proof_of_work_work_on_nano/

@MCCCS thank you for the link and your help!

I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed.

The nonce is a value that a miner can change. It is one part of a block. The other parts are block headers and transaction details. The hash is of most of this, not just the nonce. The hash must be less than the current target "difficulty".

Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself and the transactions chosen, the previous hash, and other relevant items are hashed all together?

The latter.
As I mentioned, the comparison is not the number of leading zero bits but a normal numeric comparison. The hash must be numerically less than the target.

If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred?

A block can contain no real transactions other than the so-called "coinbase" transaction which pays the miner a mining reward.
Including other people's transactions allows the miner to collect and claim the transaction fees. SO there is a financial incentive for the miner to include transactions.

If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions?

Yes.

If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes.

No.

Awesome. Thank you very much for your comments. This helps me a lot! Got more questions. Hope you don't mind. If a new transaction is broadcasted, which miner gets to record in a block? Whoever records it in a block and issues it first gets rewarded? Like a competition? Does a miner get to decide how many transactions to be recorded in a block? If you know, can you please share some current applications or cases with me where bitcoin networks and blockchain technologies are actually used in transaction processing? Sorry again for asking so many dumb questions at once. Thanks!

All miners (who want to) can add the transaction to the "block candidate" they're working on. The first who manages to produce an actual block (which meets PoW) that includes the transaction gets it and the fee. Miners have complete authority over the decision what to include in their blocks, as long as the block is valid (no invalid transactions, no money printing, resource limits, ...). Blocks have a "weight" limit, which miners need to stay below.


text:
What is the incentive for continuing to mine bitcoin as we get very close to the 21 million cap?
The Investopedia article on Bitcoin explains the Bitcoin issuance schedule and how it's halved every four years. Currently, roughly 18.5 million have been mined, with the total cap being 21 million. It's assumed that the last Bitcoin will be mined in the year 2140, which is obviously quite a ways off.
Given both the monetary and energy cost of mining Bitcoin (the two are related since it requires a large amount of computing power), isn't there a diminishing incentive to continue mining Bitcoin as we approach the hard-cap limit of 21 million bitcoins? In other words, as the supply of Bitcoin nears its cap, and the reward for verifying transactions is halved, what will incentivize individuals to continue mining Bitcoin if their odds of verifying a transaction before anyone else decreases? And on the off chance that they do it first, the reward will be miniscule. Investopedia touches on this:

In actuality, as the year 2140 approaches, miners will likely spend years receiving rewards that are actually just tiny portions of the final bitcoin to be mined. The dramatic decrease in reward size may mean that the mining process will shift entirely well before the 2140 deadline.

Follow-up question: Couldn't this lead to a monopoly situation where fringe miners give up entirely and only the biggest mining networks reap the profits of continuing to mine Bitcoin?

When that runs out, the system can support transaction fees if needed.

Satoshi Nakamoto

The fact that the subsidy (newly minted bitcoins) decreases does not mean that the overall reward that miners receive decreases too: they also collect the fee of all transactions they verify and these tend to increase with the use of the bitcoin network.
Furthermore the value of the reward, measured in fiat terms, has compensated the decrease in bitcoins received with the increase in their price (at least so far).

Follow-up question: Couldn't this lead to a monopoly situation where
fringe miners give up entirely and only the biggest mining networks
reap the profits of continuing to mine Bitcoin?

For what we have seen so far, fringe miners are those have high electricity costs or use inefficient hardware, these factors affect more the sustainability of business than the scale of the farms.
It will be always possible run small farms or even a single miner (maybe using an old and cheap asic) if you have near zero energy costs.


text:
How much privacy does Lightning actually have?
I can't find any information on what information is actually contained within a lightning transaction.
Lets say Alice wants to pay Bob on lightning and routes through R1, R2, R3 in the following order
Alice > R1 > R2 > R3 > Bob
I assume Bob needs to know information regarding the channel UTXO from Alice, otherwise how would Bob know that the channel is funded?
If this assumption is true, how is Lightning more private than Bitcoin? (except for the fact that nodes don't need to store the information on channel UTXO's [but they can if they want...])
If Bob is known amongst authorities as a common endpoint for whoever they are targeting, they can compel Bob to reveal if he received a payment which was funded from a channel with some known UTXO (they would know the channel UTXO from on-chain analysis of their tracking of Alice). If Bob is logging the information he's paid with, then he would have the ability to comply with this authority, effectively making this Lightning payment no more private than a Bitcoin payment. If Alice gave Bob some personal information in relation to the payment, this would completely dox Alice to authorities.
Also, does R1, R2, R3 also know the channel UTXO?
If the channel UTXO is not known amongst participants, how does the target channel validate that the source channel is funded?
Would appreciate guidance on this
Thank you

Bob only knows the channel R3--Bob and his other channels.
in particular due to the onion routing Bob has no way of knowing who send the payment or say anything about the channels of the sender (as Bob does not know the sender)
Routing only know their incoming and outgoing channel. So the only thing that R2 would know is that there was and HTLC offered by R1 and that it is supposed to be forwarded to R3.
With respect to your question of how does Bob know about Alices channel. As said Bob doesn't but you could invert the question. If alice wants to pay Bob, how does she know about the R3 - Bob channel? There are two possibilities. Either Bob specified a Routing hint in the invoice or she does so (with other channels on the path) with a probing trial and error approach. This is well described in https://arxiv.org/abs/2103.08576 where this was also used to probe for the balance values of channels. In that sense the information on Lightning Network is not strictly private.
However probing takes time and might be inacurate as there are counter measures to probing channel balances. (In comparison if you see something on chain it is pretty clear that this is the reality)

That's very interesting thanks for your answer


text:
How to use Bitcoin Core GUI to view all transaction records of a certain address?

I want to implement this function: given a Bitcoin address, what should I do to view all transaction records of this address?

There is a search bar under Transactions tab that you can use to do that

I tried this, but to no avail. The two pictures below are my test results[img]https://i.imgur.com/IJl6sCw.png[/img]，[img]https://i.imgur.com/i6iurIl.png[/img]

@muxi This only works if the address if part of your own Bitcoin Core wallet. For unrelated addresses, you need other software. Bitcoin Core does not support arbitrary address indexing.

@Pieter Wuille,So which software can achieve this function? Instead of a browser like OKlink, become a full node and use the downloaded data

Sorry I thought you were referring to your own address. For others I always search the Bitcoin explorer. I use https://mempool.space/. However if you are searching for the address you posted above starting with tb1, that is a testnet address and not on the mainnet.


text:
Is there a method in the Bitcoin RPC API to view all transaction records of a given address?
I used the listtransactions method to get transaction records, but it returned an empty collection.
Is it a configuration file problem or other reasons?

Bitcoin Core only tracks your own wallet’s addresses. If you want to look up a foreign address, either you have to import it to a watch-only wallet and rescan, or use a different software that has an address index.
The ability to look up any address is usually associated with the functionality of blockchain explorers. You could either use the API of one of many publicly available blockchain explorers, or run your own version of e.g. the Mempool block explorer project or Esplora.

What software has the function that has an address index?


text:
Running Bitcoind - prerequisites
Do I need to install the Bitcoin GUI and download the entire blockchain before being able to run bitcoind?
The instructions ask us to directly run bitcoind -daemon , will this start downloading the blockchain in the back end
https://bitcoin.org/en/full-node#mac-os-x-yosemite-1010x

Yes bitcoind will download the entire blockchain so that it can work out what money is real.
You can enable pruning if you don't want to permanently store old blocks and don't want to help ensure the future security of Bitcoin.
You don't have to ever run bitcoin-qt


text:
Bitcoin Core Wallet - Google Authenticator?
I know this is probably a weird question, but I need to be absolutely sure.
Does the Bitcoin Core wallet offer 2FA through Google Authenticator, kind of like Electrum does?
I'm asking because I've read that the people who update their GA app lose all their old codes, and I can't risk having that happen to me.
Is there anywhere in the Bitcoin Core client UI I can check if 2FA is enabled?

Bitcoin Core does not have a 2FA functionality.


text:
i have not receive the transaction
i have transation asf :
BITCOIN-PAYMENT HAS BEEN SUCCESSFULLY SENT:
Transaction Detail:     $750,500
Recipient Address :   bxd94D0A4aE4F29bf408c48d8217fB53cb68a22Db3
Date:                           March 8, 2024 1:42 PM
Amount:                     12.00 BTC
Status:                        Completed
and i checked it but none

You can use any "blockchain explorer" to see that  bxd9...2Db3 is not a valid Bitcoin address
Bitcoin addresses usually start with 1, 3 or bc1 so it hard to see how you could have generated that as a receiving address using a Bitcoin wallet.
Anyone claiming they sent Bitcoin to that address is either mistaken, incompetent or lying.


text:
Very slow sync using bitcoin core on Mac mini m1
I'm using an M1 Mac Mini, 8GB memory, 256 GB internal SSD, 2TB Toshiba SSD (which is where the blocks are being stored). Google fiber internet.
I've been syncing now for 2 weeks, I'm at 60%. This seems incredibly slow. I'm using Bitcoin Core.
Any suggestions for improving sync time.

Have you set a higher -dbcache? See https://bitcoin.stackexchange.com/a/22367/5406

I did I upped the dbcache to 4096

Is that an external SSD or an internal SSD? How is it connected to the computer?

External connected via USB/C. Which I would be suspicious as being the culprit here, but looking at network activity, it's very sporadic. Big gaps of time with no activity, and then spikes. Bitcoin Core Network Traffic says that I've received 159GB of data I believe since Apr 9 (so 10 days). I really don't understand the Peers tab, for example at this moment it shows NO peers.

I know that sync'ing can be slow, but this seems crazy. It's been running for over 2 weeks now and I'm at 61% and only up to Jan 2021 blocks!

I would still suspect that the culprit is the slow read/write due to the drive being external. Which version are you running?

hi sorry for delay, I'm running client version v26.1.0

One other thing I noticed, I was away for a few days but left everything running, but when I got back there was little to know process and when I woke up computer Core said connecting to peers. Peers window showed no connections.

I did see a suggestion online that sync'ing is improved if one adds explicit peer connections. Was going to try that via config. Does anyone have thoughts on that as a solution.

I thought I'd try moving to a direct internet connection. Speed test with move bumps me from about 100Mbs to 500Mbs. So far not noticing any speed improvement with node initialization. I'm now about 6 weeks into this and still only at 85%.

To move the machine I did a graceful shutdown of core and restart so I have a good accounting of the startup logging. I don't see anything suspicious in there but if anyone out there is good at reading this log and could spot something lmk. Not sure how to publish it here though, it's pretty large and also not sure if it contains anything that could jeopardize my security?

Hi I wanted to update status on this. I do believe my issue was I was using a very slow external SSD. I did however end up also getting off the M1 Mini and instead used an older MacBook I had (had a bad battery but replaced it). I used the same SSD drive and just waited it out. It finally completed yesterday and now all is good. I enabled connections to it and it's now humming along the millions of other nodes out there and doing it's part to keep BTC secure.


text:
is webtrader.xtprofit.net Legit
I had opened an account a few week ago with Xtprofit platform. I test some transactions with a litte amount, and it works.
But there are some security issues:
1- I can't activate two factor authentication (2FA)
2- I can't add fishing code
3- All transaction withdrawal and deposit pass throw an non identified adress. For example, within my account, I can't see my bitcoin address to receive external money, and withdrawal is complicated and must done by the advisor financial.
When I ask for those issues, the support team told me they are an investing company and not a cryptocurrency exchange. All transactions of deposit and withdrawal should done with my advisor financial.
The company has its phone contact and adress in London.
It easy to see that information in their web site: https://www.xtprofit.net/contact-us
Is anyone here had an experience with this company?
Is this a scam platform investment?

xtptofit.com only recently created  2. No UK limited company or PLC registered with that name 3. 40 Bank street probably has thousands of different occupants - many different businesses offer offices to let there as well as virtual offices - a good place to falsely claim as an address. Especially if you omit the floor number and office number.


text:
Is there a blockchain system team calling by phone for recovery fund
I was contacted on mars 2024 by blockchain team recovery using eamil adress like : @recoveringblockchain.com or @management-departement.com.
This team told me that I am a owner of a fund of 4.2 BTC worth of 261 224$ US.
It send me what it calls a wallet statement and a link to see the account on blockchain web site. It's not a full access.
To get full access to this account the recovery blockchain team ask me:

First:  send 0.03 BTC to activate my account
Second : send a copy of my licence driver and my bank statement
Third send: send 0.1 BTC 6 176,20 us $

The team doesn't show me all this steps in the first calling. It was progressive.
At the third step, I made a request for blockchain security departement. I send all documents and e-mail from this team. Blockchain security departement told this is scam and I have to stop conversation with this team.
But, the recovery team continues to call me using  blockchain lego and  what seems real whatsapp number from UK . This team insists that it's not a scam but it's from the blockchain system. It works Spratley from blockchain fiat wallet. They ask me to make decision and if I stop the process they will refund me the 0.03 BTC (First step from the  process) and the fund wil be closed. This team doesn't  have a web site and doesn't have a platform where I can maque a request. At this time, I realise that at the 3 third step I do the right thing by contacting blockchain seurity departement. But I have a dubt, is blockchain system real and is working separetly from blockchain.com fiat wallet with no web site and paltform? Is anybody here have a similar experience. Am I really woner of 4.2 BTC or is it a scam?

Is there a reason you yourself don't know if you own a wallet with that amount in it?

What you describe is typical for a scam operated by criminals looking for people who don't know how Bitcoin works and who can be made confused and panic into doing foolish things. I would cease all communication with them, block them and ignore them.

Is there a blockchain system team calling by phone for recovery fund

No.

eamil adress like : @recoveringblockchain.com or @management-departement.com.

Clearly deceptive/fake. They also contain spelling mistakes that would not be made by a genuine business.

This team told me that I am a owner of a fund of 4.2 BTC worth of 261 224$ US.

Criminals tell that lie to hundreds or thousands of people in the hope of finding at least one person that will be uninformed, greedy or gullible enough to become their victim. Criminals prey on widespread human weaknesses like this.

It send me what it calls a wallet statement and a link to see the account on blockchain web site.

It is easy to set up an account with fake details. It is easy to add any valid Bitcoin-address as a watch-only Bitcoin-address, even if you don't own that Bitcoin-address. Criminals do this to deceive their victims.

the recovery blockchain team ask me:
First: send 0.03 BTC to activate my account

The criminals succeeded in tricking you into giving them money. Now they know it is worth their while to work on you and keep tricking you.

Second : send a copy of my licence driver and my bank statement
...
I send all documents

If you sent them your driver licence and bank statement they can impersonate you and run up debts in your name or commit other crimes using your name knowing that the police will contact you first not them
Look for "Identity Theft" advice from your local police. For example, like   ActionFraud for people in the UK

Third send: send 0.1 BTC 6 176,20 us $

See Is it normal to be asked for an advance fee on a withdrawal?

the recovery team continues to call me using blockchain lego

Logos are easy to copy. They don't mean a thing.

and what seems real whatsapp number from UK

There's no way to tell, and anyone can anonymously obtain a UK phone number for peanuts. A UK number is no guarantee of honesty or truthfulness,

I have a dubt, is blockchain system real and is working separetly from blockchain.com fiat wallet with no web site and paltform?

Lots of different people, including lots of criminals, use the name "blockchain".
There is a genuine business that operates a website named blockchain.com, but they are not in charge of the Bitcoin blockchain. Just as the car rental company dollar.com is not in charge of the US dollar.

Am I really woner of 4.2 BTC

No

or is it a scam?

Yes


text:
how to calclate the fee of a segwit transaction?
I am using bitcoin-js to construct a PSBT transaction.
Suppose address A has 10 UTXOs, each containing 0.0001 BTC.
Now I want to construct a transaction to send 0.0005 BTC to address B.
If I use 5 of the UTXOs, there will be no BTC left to pay the fee.
If I use 6 UTXOs, the transaction will succeed when the fee is less than 0.0001 BTC, but will fail when the fee is greater than 0.0001 BTC.
Similarly, using 7 or more UTXOs also encounters the same issue.
How can I calculate the fee and the required number of UTXOs to ensure the transaction succeeds and to calculate the change? Thank you.


text:
Shouldn't CChain::Next check if the given block is the tip block or not?
This function here gives a pointer to a block, and return the succesor block of that pointer.
    /** Find the successor of a block in this chain, or nullptr if the given index is not found or is the tip. */
    CBlockIndex* Next(const CBlockIndex* pindex) const
    {
        if (Contains(pindex))
            return (*this)[pindex->nHeight + 1];
        else
            return nullptr;
    }

If the given block is containing in the chain, it attempt to return the successor. So if the Chain.Tip() is given, it tries to reach the successor while there is no successor of the tip block. Isn't it better to check if nHeight of the given block is less than the Chain.Tip().nHeight - 1 or not?

That would not guarantee that the currently inspected block has a successor. While eventually the network converges on a single best chain, the network does temporarily fork occasionally, when two miners find a block at the same height. If a node were on the chaintip that is being reorged out there could be a block with a greater height, while it is not the successor of the node's current best block. Insofar, we must handle blocks not having successors anyway, so I assume that the nullptr is handled benignly somewhere in the surrounding code (I haven't checked, though).

Yeah, you're right. I checked it here, it handled in the [] operator. Thanks for your answer. https://github.com/bitcoin/bitcoin/blob/master/src/chain.h#L453

I forgot to check the [] operator of the CChain class. The implementation is:
    /** Returns the index entry at a particular height in this chain, or nullptr if no such height exists. */
    CBlockIndex* operator[](int nHeight) const
    {
        if (nHeight < 0 || nHeight >= (int)vChain.size())
            return nullptr;
        return vChain[nHeight];
    }

So by calling the (*this)[pindex->nHeight + 1] the operator that is overloaded is called and if the nHeight is greater that the vChain.size() it returns the nullptr.


text:
Why rebroadcasting transactions in the Bitcoin Core?
There is a function here, named ResendWalletTransactions in the Bitcoin Core:
// Rebroadcast transactions from the wallet. We do this on a random timer
// to slightly obfuscate which transactions come from our wallet.
//
// Ideally, we'd only resend transactions that we think should have been
// mined in the most recent block. Any transaction that wasn't in the top
// blockweight of transactions in the mempool shouldn't have been mined,
// and so is probably just sitting in the mempool waiting to be confirmed.
// Rebroadcasting does nothing to speed up confirmation and only damages
// privacy.
void CWallet::ResendWalletTransactions()
{
    // During reindex, importing and IBD, old wallet transactions become
    // unconfirmed. Don't resend them as that would spam other nodes.
    if (!chain().isReadyToBroadcast()) return;

    // Do this infrequently and randomly to avoid giving away
    // that these are our transactions.
    if (GetTime() < nNextResend || !fBroadcastTransactions) return;
    bool fFirst = (nNextResend == 0);
    // resend 12-36 hours from now, ~1 day on average.
    nNextResend = GetTime() + (12 * 60 * 60) + GetRand(24 * 60 * 60);
    if (fFirst) return;

    int submitted_tx_count = 0;

    { // cs_wallet scope
        LOCK(cs_wallet);

        // Try to add wallet transactions to memory pool
        for (auto wtx : GetSortedTxs()) {
            // Attempt to rebroadcast all txes more than 5 minutes older than
            // the last block. SubmitTxMemoryPoolAndRelay() will not rebroadcast
            // any confirmed or conflicting txs.
            if (wtx->nTimeReceived > m_best_block_time - 5 * 60) continue;
            std::string unused_err_string;
            if (SubmitTxMemoryPoolAndRelay(*wtx, unused_err_string, true)) ++submitted_tx_count;
        }
    } // cs_wallet

    if (submitted_tx_count > 0) {
        WalletLogPrintf("%s: resubmit %u unconfirmed transactions\n", __func__, submitted_tx_count);
    }
}

I'm not sure I correctly understand the usage of the CWallet class. By reading the comments and code, I think this class manages the transactions of the Bitcoin Core's node itself and it plays as a role of regular wallet (beside the fact that it is running on a node). It creates transactions and manages UTXOs. Is this correct?

I tried to figure out the reason behind rebroadcasting from comments above, but couldn't understand anything useful. What is the need to rebroadcast a transaction? As its name suggest, it is broadcasting a previously broadcasted transaction. So why should we want such a thing? Isn't broadcasting once sufficient?

Even if the flag fBroadcastTransactions is set to true, the function waits until GetTime() is greater that the nNextResend, and this variable is set to at least 12 hours later from GetTime(). So this means that someone who uses the Bitcoin Core's wallet, should wait at least 12 hour for the transaction to be broadcasted? I'm pretty sure that I'm wrong but can't figure out where.

Thanks for any help.

I'm not sure I correctly understand the usage of the CWallet class. By reading the comments and code, I think this class manages the transactions of the Bitcoin Core's node itself and it plays as a role of regular wallet (beside the fact that it is running on a node). It creates transactions and manages UTXOs. Is this correct?

Yes, CWallet is the core of Bitcoin Core's wallet implementation. It tracks the user's transactions and addresses, and constructs and signs transactions.

I tried to figure out the reason behind rebroadcasting from comments above, but couldn't understand anything useful. What is the need to rebroadcast a transaction? As its name suggest, it is broadcasting a previously broadcasted transaction. So why should we want such a thing? Isn't broadcasting once sufficient?

Bitcoin's P2P network doesn't guarantee reliable transmission, especially about unconfirmed transactions. Maybe you were only connected to one or a few nodes, and maybe they went offline right after receiving your transaction. Maybe they were light clients, were broken, or were even malicious, and ignored your transaction entirely.
Even if your transaction made it to a large portion of the network's nodes, it may have gotten evicted from the mempools of those nodes if there was a large wave of higher-fee transactions than yours. If so, it's possible the network may just have forgotten about your transactions.
Especially if it is an incoming payment, the responsibility is on you to get the transaction confirmed. To a lesser extent this is true for the sender as well. The way to accomplish this is broadcasting it to the network, and if it appears to not get mined, occasionally attempt to rebroadcast it.
There has been work around moving this responsibility from the wallet to the mempool. The most important reason for this is privacy: rebroadcasting is a very obvious signal you care about a transaction, as parties not involved in the transaction don't perform this rebroadcasting. If rebroadcasting would be done more generally for all transactions in your mempool (not just ones affecting your own wallet), it would be less obvious.

Even if the flag fBroadcastTransactions is set to true, the function waits until GetTime() is greater that the nNextResend, and this variable is set to at least 12 hours later from GetTime(). So this means that someone who uses the Bitcoin Core's wallet, should wait at least 12 hour for the transaction to be broadcasted? I'm pretty sure that I'm wrong but can't figure out where.

That's exactly right. A rebroadcast event is scheduled somewhat randomly, with 12 to 36 hours between events.

Thanks for the answer, so you mean it is possible that a transaction I sent using the Bitcoin Core wallet will be confirmed 12 hours later due to rebroadcasting latency? (even with enough tx fee). Isn't it a flaw for the wallet?

It is possible that a broadcasted transaction isn't confirmed at all, ever. This is true for every wallet, and there is nothing the wallet can do about it but retry to get the transaction known to the network. It only does this every 12 hours because doing it very frequently is a privacy leak.


text:
I've been reading about "loop in" and it seems to be like a one-way offline channel, is that correct?
Am I oversimplifying? I feel like I must be missing some details.
Can I use my Trezor to sign loop in transactions in theory?

I would not recommend the notion of a one way offline channel. Historically one way channels could have been build for a long time by offering new signatures for spending an output of a 2-2 wallet to the 2nd party in which more and more btc of the consumed input are given to the 2nd party. The second party naturally has an incentive to publish the latest of such tx.
Loop is more like a submarine swap. With loop in you request to get some balance on a payment channel to your side.
Let us assume you have a payment channel with 0.1 btc capacity but all the money is on your partners side. However you would like to add some funds to your side without rebalancing your channels or opening a new channel.
In order to achieve that you could create an invoice with a payment hash. A person might be willing to pay that invoice on lightning if you reimburse that person on chain. The question that loop solves is to make this process trustless.
You make an onchain btc tx to that person but encumber a second output which goes back to you with a timelock. The output that can be claimed by that person can only be claimed if the preimage of your payment hash is presented. This works directly before the timelock expires.
Now there are two cases. Either the person pays your invoice and receives a preimage and can be sure to get reimbursed. Or if the person does not pay the invoice you can reclaim your btc after the timelock. Noone needs to trust the other side.
What I don't know is if trezor allows to sign such a timelocked / special transaction and how the trezor api works. However I don't see any reason why it would not support signing such a transaction.


text:
How to get a balance from the network directly?
I was under the impression that I'd be able to get a balance from the network directly, not only by going through some http interface which wraps the server RPCs.
I am curious, is it possible to get a balance by hitting a node on the network directly? I've tried using curl to hit every node on the network already.
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://${server}/

The documentation says to include the --user flag, so I believe this is why the calls fail.
If not, how is my Trezor able to operate independently? Does my Trezor depend on Trezor.com running a node?
Also, I am curious, some APIs must be open, for example a new node which wishes to sync must be able to fetch blocks from it's peers, but I see that getblock RPC also requires authorization, i.e. "curl --user"...
https://bitcoincore.org/en/doc/0.20.0/rpc/blockchain/getblock/
What APIs do nodes in the network expose directly? Any?
Thanks!

Bitcoin nodes have no idea of what a "balance" is, that's a concept that wallets have. The Bitcoin peer to peer network allows for the communication of transactions or blocks (neither of which contain "balance" information), and nothing else. There is also no portion of the private RPC API which will tell you the "balance" of an arbitrary address either (it can tell you detail about a locally running wallet with getbalance however), and these interfaces are never made public because they allow almost complete control of the nodes wallet and operation.

Does my Trezor depend on Trezor.com running a node?

With their software as supplied, absolutely. If you use it with another piece of software locally it is usually the case that you're trusting a remote party, but there's the possibility of setting it up in such a way that it does not. For example, Electrum, but only when connected to Personal Electrum Server, which runs locally as a middle man between a Bitcoin node you operate and Electrum.

https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/getbalance/

You're wrong, but fair enough. In that case how do I get all the outputs to a certain address?

getbalance is a wallet RPC. It only shows information about the current local wallet, you can not use it for anything that isn't stored in a wallet file on the Bitcoin node itself. Why ask questions on stackexchange if you're simply refusing to believe the information given to you by an expert?

The RPC interface is also not exposed to the internet; it's only designed for letting the node's operator query it. The network itself uses a P2P protocol, which has no concept of wallets or addresses at all.

Fair enough, right. Why would a miner want to provide wallet services... Okay, so how would I do this? I want to get a balance from the network without running a node...

Then you'll need some service that provides that information to you, and you'll have to trust them. There are plenty of sites that do this (block explorers, and others), but if you're relying on this information for anything important, I'd strongly recommend against this approach.

So SPV wallets are not possible on BTC anymore?

SPV is a description of how data is verified, it has absolutely nothing to do with how you obtain that data.

"How old are you?" "I can't tell you, I can only verify that my age is 39". Bitcoiners are weird...

Letter sized paper is 8.5 x 11 inches. Why isn't this a description of where to buy it!?

@ClaytonRabenda You could run a lightweight node that does SPV, though they can't verify completeness of the information they received (they can verify incoming transactions, and how much they pay you, but they can't guarantee that your peers didn't omit information). This has always been an issue for SPV.


text:
Why does the first bitcoin client only supported windows
Starting from version 0.1.0 up to 0.1.5 the bitcoin software could be run only on only Windows 2000 / Windows NT and Windows XP
Was there a technical reason from Satoshi for this choice of operating system, or maybe he wanted his client to be run on the maximum amount of computer, or maybe he had more knowledge of windows ? Linux seem more fit for open source and "Cypherpunk" that windows.

If you want a definitive answer, you'll need to ask him I'm afraid.
My best guess is that Windows development was the thing he was most familiar with (or even only familiar with). The coding style was also similar to one commonly used in the 90's by Windows developers.


text:
Why changing Bitcoin Cap Limit Is Not Possible
To alter the Bitcoin blockchain protocol, such as increasing the Bitcoin cap, a consensus among the majority (95%) of participants is necessary due to decentralization and the consensus mechanism.
However, with only 18,000 full node Bitcoin users, achieving the required 95% agreement threshold, roughly 17,100 full nodes, don't seem challenging. Many of these nodes can belong to the same institution.
As FED is already run by secret group, its also possible most of bitcoin full node is already running by some institutes.

You misunderstand. Having even 99.9% of nodes on the network is meaningless in terms of someone's ability to alter the Bitcoin network's consensus rules.

Possible duplicate of https://bitcoin.stackexchange.com/q/61759/5406

@Murch Thanks for this useful link. but its not a duplicate question.

Imagine Bitcoin was run by only you and 2 other friends. Each of you run their own node. You decide you want to change the code, so you spin up 40 new nodes so that now you have 95% of the nodes. You change the code on your nodes, but your friends don't.
What would happen is that you would be left alone, while your friends would keep exchanging sats between them. No one will accept your blocks, the network would fork and your nodes would be mining blocks that no one care about.
In a nutshell, it's not about 95% of the nodes, it's about 95% of economic interests on the network. And it doesn't need to be 95%, it must be a vast majority, but not sure if the value is fixed on 95%.

If network start forking between my block and my friends block. Just because majority nodes accepted my protocols (because i am running them), due to which my branch increase in length and accepted by main block.
Because as per the rule longest chain consider valid and all node switch to it.

@Burair, the longest valid chain, nodes don't keep track of invalid blocks. (and it is chain with most work not longest)

As @RedGrittyBrick said, even though there are 40 nodes mining branch B (your branch), your friend's nodes will not accept those blocks, since they would be invalid to them (remember, they didn't update the code, so they are still running the previous version of the code) so they will keep themselves on branch A.

@bordalix , If i am merging my branch B into main branch and every other node have to update their software. Which mean all the node now follow my code changes. Right?

@Burairabbas no. You cannot merge branches, since they are incompatible. Let's say blocks on branch B (your branch) have a new block subsidy of 21 while blocks on initial branch still have the initial 3.125 subsidy. Your friend nodes will never accept your blocks, and you cannot force them to update their code. From the fork moment onwards there will be 2 branches/networks, Bitcoin and Buraircoin.

@bordalix  I believe i am not understanding the blockchain or bitcoin principle.
Let me define it:
There are more than 300 issues in Bitcoin github and developers are actively working on it. Bitcoin is based on blockchain and it is just a project which allow people to transfer crypto-currency over the internet with PoW.
And every person who literal own that project in their local machine are the full nodes and act like a ledger.
Am i correct till now ?

Like any other project, bitcoin is just a project.
If developer is fixing any bug or improving any thing, than all node simple update its software and it got reflected their. For example: if i want to change the logo of bitcoin than i create a new feature branch, update the logo and open the merge request. When it got accepted. New logo is reflected when someone update its software.
Just because its an application people will update it with their own comfortability. Like user update their android phone and windows laptop.

@bordalix
As i am repeating myself again. Like any other project, bitcoin is just a project.
For example: If i am change any logic or fixing any bug in my ecommerce project. Or changing logo.
I dont ask my user or do consensus either they like new logo or not.
They update the software and logo updated.
So, why dont we just simple change the bitcoin code like any other project?

First, there's a central point for Bitcoin code at https://github.com/bitcoin/bitcoin. In order for you (or any other person) to change the code, the change must be accepted by the repo coordinators. Second, not all changes are equal: changing a logo doesn't change the coin, but changing the consensus rules will. Third, there's no auto update on bitcoin, users must update it by themselves. So, you're not wrong, changing bitcoin is about changing the code, but that change must be accepted by the community to have an effect, and that's why you cannot change the bitcoin cap limit on your own.

@bordalix as per your statement:
'changing a logo doesn't change the coin, but changing the consensus rules will'
Why changing the consensus need to change the coin? A simple 'CHANGE OF LOGIC' can't identify as a Change in Consensus Or Change in Logo.
If i change the consensus rule and most of nodes accepted it. Then those you haven't updated there software are the one left alone.

@bordalix
For example: old protocol rules said 'Bitcoin cap < 21M' while new updated code block protocol said 'Bitcoin cap > 21M'.
Then old nodes rejected new block. Plus they loss the opportunity of getting new reward coins on validation.
Vice versa If old nodes validate any coin all of the network reject their block because they are violating new protocol.
What if: in old protocol have some bug like one found in 2010 where 184 billion new bitcoin was created in single transaction.
At that point, either they have to leave their branches Or update their code with new protocol.

@Burairabbas "Then old nodes rejected new block. Plus they loss the opportunity of getting new reward coins on validation" - old nodes will be validating and getting rewards from old network. For them the new network is worthless.

@Burairabbas "What if: in old protocol have some bug like one found in 2010 where 184 billion new bitcoin was created in single transaction" - yes, in this case a majority of miners must adhere to the code update in order implement the soft fork and reverse the bug. But this was a very special situation, one of the two moments where Bitcoin had a downtime: https://en.bitcoin.it/wiki/Value_overflow_incident

@bordalix - "old nodes will be validating and getting rewards from old network."  If there were a 2 branches. New nodes which are on new protocol and they are in majorities. So, most of the transaction is validated by them. Old nodes which are in minorities like 1% as compare to new nodes. If i did a pizza transaction. And its validated by old nodes. The receiver and me both using different wallet service provider. My wallet confirmed my transaction but receiver wallet only verify the new protocol branch, can't verified it. Does this create any conflict? If there any chances for this scenario?

@Burairabbas you would have 2 networks: Bitcoin with 2 nodes, and Buraircoin with 40 nodes. They will not validate transactions from each other, as Bitcoin nodes don't validate BCash transactions and vice-versa.

@bordalix Thanks for your all answers.

Every Bitcoin node unilaterally enforces the protocol rules locally. Bitcoin Core (and most other Bitcoin node software) does not have an auto-update function. Nodes only update when their operators choose to install a new version of the software. Node operators decide what they consider to be Bitcoin every time they choose which version of the software to run. Not updating to a version that implements new rules that breaks with established precepts of Bitcoin is the expected decision.  Bitcoin’s network rules emerge from these individual decisions.
Therefore, it is unlikely that you would succeed at convincing 17,000 of 18,000 nodes to run your forward-incompatible version. Even if you spin up thousands of new nodes, the existing nodes will not be influenced: they enforce the rules of their own implementation. Even if you were to convince a majority to upgrade to your new version, a minority could stick to the old rules, the nodes following the old rules would simply reject the first block found by the new nodes and ban the peer for sending them invalid data. The networks would separate in two whenever the new nodes published their first block.
Basically, it comes down to: "I don’t care what rules your node accepts, my node enforces the rules that I think are Bitcoin." I might reconsider if I see evidence that the economic majority rests with the new rules, but for above reasons, I’d expect that the economic majority would stick to the old rules, just like it did when BCH forked off.


text:
Network fee accuracy question
I have an investor telling me he made 7k in bitcoin from a 200$ investment today.  He says there is a network fee of 500$ to withdraw the funds for me.   Is this or can this be accurate?


text:
synchronizing with network issue
My wallet says synchronizing with network, 3 days behind. I been waiting to receive my BTC from my sportsbook for 3 days and it's just stuck in limbo on blockchain. What's seems to be the problem with this transaction?


text:
Will a hard fork be required to change timestamp fields?
In the protocol there are multiple timestamp fields with varying lengths. For example a 4 byte unix timestamp would overflow in the year 2106. Will a hard fork be needed to deal with this issue in the coming century?

There is a fairly trivial solution, which is technically a hard fork, but doesn't require changing fields.
The idea is that the timestamp is indeed treated as a 64-bit value, but only its lower 32 bits (which are then allowed to overflow) are stored in the block header. When a block's 32-bit timestamp is sufficiently much lower than the previous blocks' 32-bit timestamp, it is assumed to have overflowed, and 2^32 is added to the interpreted 64-bit timestamp.


text:
How is the input and output fields serialised in a transaction?
I'm trying to write a parsing function to find the input and output fields in a serialised transaction.
My problem is that I can find the number of inputs and outputs using the varint byte(s), but not the length of each serialised input and output, since the scriptsig and scriptpubkey fields are not fixed sizes.
I can't find any other way to find the sizes in the serialised bytes, help is much appreciated.

Inputs and outputs are self descriptive in length. They contain some fixed length fields, and have a variable length script which will tell you its length. Each script is always prepended by its length in the form of a compact size unsigned integer (the same kind used to indicate the number of inputs and outputs).
For an input, your parser should read 32 bytes as the txid, the next 4 bytes as the output index, then a compact size unsigned integer for the length of the script, then the script itself using the length previously read, and then the sequence number.
For an output, your parser should read 8 bytes for the output amount, then a compact size unsigned integer for the length of the script, then the script itself using the length previously read.

Thank you this was very helpful!


text:
Size of seed used in murmur3 hash BIP0037
I'm trying to implement a seeded murmur3 hash using the bip37 standard for use in bloom filters.
In hash.cpp in bitcoin core, the seed is an unsigned int value. However my understanding of bip37 to determine a seed value is defined with the formula
i * BIP37 Constant + Tweak
where i iterates the number of functions.
Example, If i = 4, and Tweak = 100, this would lead to an overflow since it cannot be represented in a uint32?
I would be grateful for help, and to know if I need to use a 64-bit int for my seed.
Thanks.

Murmur3 is a 32-bit hash function. All internal variables, as well as the seed and the output, are unsigned 32-bit integers. uint32_t arithmetic is modulo 232.
Also note that BIP37 is all but dead.

Oh I see thanks, so what replaced bip37 for bloom filters?

It's not a direct replacement, but bip157.


text:
who is sending all the 120-140 satoshi/byte transactions?
In the last few weeks, the mempool size has grown significantly. You can see with a mempool fee viewer such as this one that overwhelmingly, transactions are growing at the 120-140 satoshis/byte fee range.
Why would this particular level grow so much faster than any other level? Is there any activity that is more likely to be in these transactions? (like sending money to exchanges, activity from certain wallets, certain blockchain services, etc...?)

I noticed that blockchain.info wallets recommend fees in the 120-140 s/B range. I've been manually increasing my fee to ensure my transaction gets confirmed by checking https://bitcoinfees.21.co/ when I send money anywhere.
I would assume there is simply an error in how blockchain.info and potentially other wallets are calculating the appropriate fee.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Recovered Funds
I was scammed on an investment site https://mercadobitcoinxio.com site. A company said they were able to recover my money. They want me to fill the Atomic Wallet information as follows:
https://rpc.test.btcs.network
Chain id: 1115
Currency symbol: BTC
Block explore: https://www.blockchain.com/explorer
Is this a scam?

It's most likely a scam. In almost all cases it's not possible to recover money you were scammed out of, but you'll nevertheless be contacted by "recovery specialists" who will try to scam you again. See How do I recover from a cryptocurrency scam?

Thanks for the response.


text:
How can a transaction be spent unless it is written in the blockchain?
I'v seen an unconfirmed transaction in the blockchain.com and one of its outputs is currently spent. How it this possible for coin to be spent before the transaction is written on the blockchain?

How it this possible for coin to be spent before the transaction is written on the blockchain?

It isn't possible.
The first transaction e491e326cae4fa2071ebf2c977f6f945e7cb8fe450d489d4c97a97b2a717908a sent money to 17 addresses, the fifth of those outputs was spent in another transaction 47223eccf8253a9f58f8f76cd7cb16de979978e6dff15ea661b80453cfbf32ad
However both transactions were in block 739266.
It might be that the software, that showed you that the first transaction as unconfirmed, was simply waiting for a specific number of confirmations before marking that transaction as confirmed. It might, at the same time have marked the outputs as spent if they were already present in a transaction. In other words it might be an inconsistency in the way the specific software application is configured to apply the labels "unconfirmed" and "spent".

It sounds as if you understood the question to be whether a child transaction could be confirmed before the parent is confirmed. I don't think that the asker indicated that, though. I assume that both transactions were still unconfirmed.

I think you're looking at a chain of unconfirmed transactions.
Since transactions are immutable¹ after they are submitted to the network, you know what transaction outputs will be created before the transaction is confirmed. As it's clear what the transaction output will look like, it can already be referenced in another transaction that spends one of these expected outputs.
There is a limit to the viable length of these unconfirmed chains. Nodes on the network will only transactions that have at most 25 unconfirmed ancestors or at most a total of 101 kvB of weight across their ancestry plus themselves.
Descendant transactions can only be included in a block after their ancestors are included since the transaction outputs they're spending must exist. This means that ancestors have to either have been included in a previous block or stand earlier in the same block as the descendant. This dependency is for example leveraged when reprioritizing transactions via "child-pays-for-parent": the child has a greater fee which incentivizes the miner to include the parent so that they can include the child.

¹ The intended outcome of the transaction cannot be changed, but it's not yet certain that the transaction will be included in a block. It could also be superseded by a conflicting transaction.


text:
Create a watch only wallet descriptor with bitcoin core
Trying to create a watch only wallet descriptor in bitcoin core client.
bitcoin-cli -named createwallet wallet_name=mywallet descriptors=true

This just returns an error: method not found. Furthermore running the command with -testnet returns that the server is not enabled, make sure using correct rpcport.
Any help greatly appreciated.

What version are you using?

I'm using v0.20.99

If it helps, your command works on v22.0.0