Author

Topic: Broadcast transaction through my own nodes (Read 267 times)

legendary
Activity: 1584
Merit: 1280
Heisenberg Design Services
March 19, 2019, 12:36:56 AM
#6
And if it is possible for you to configure your node to accept a transaction as valid, for example, a 0 fee tx, what happens then? I mean, other nodes will still reject it (min relay fee not met), right?

We need to understand that there is no such global mempool or as such. Each node contains its own mempool and they store the recent transactions which they have listened from other peers. As far i have understood, we can configure our own node to accept certain set of transactions, but if you are a miner this will put you into trouble since you are mining those invalid transactions. Full node operators don't follow rules of the network to store the transactions in the mempool. Since each of the node contains their own mempool, they can configure as they wish to contain any such transactions if they are not accepted as valid in the consensus rules.

Let us consider a situation that you are a miner here. Your node accepts invalid transactions, includes that in a block and broadcast them to the network. Once the other nodes listens to the new block found, they will validate that block along with the transactions present inside them. If the block is valid, they will be added to the chain and simultaneously all other valid transactions that has been mined are removed from the mempool of the node. OTOH, if the block is invalid the node doesn't add them to the chain and further blacklists the node which has broadcasted the new invalid block.

And that would cause your node to be marked as "bad"? Or is blacklisting manual. In fact, how do nodes get rated if at all?

Whenever you start your node, you see that the wallet loads the 'Banlist' actually. The Banlist consists of certain nodes which has incurred certain amount of Banscore over the period of time. Banscores are coded in the source code of the bitcoin, and if a particular node reaches certain score they are updated in the Banlist probably.

In basic terms, when a node finds a reason the banscore increases and they are added to the Misbehaving function present in the net_processing.cpp#L943

Code:
void Misbehaving(NodeId pnode, int howmuch, const std::string& message) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
{
    if (howmuch == 0)
        return;

    CNodeState *state = State(pnode);
    if (state == nullptr)
        return;

    state->nMisbehavior += howmuch;
    int banscore = gArgs.GetArg("-banscore", DEFAULT_BANSCORE_THRESHOLD);
    std::string message_prefixed = message.empty() ? "" : (": " + message);
    if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
    {
        LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d) BAN THRESHOLD EXCEEDED%s\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior, message_prefixed);
        state->fShouldBan = true;
    } else
        LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d)%s\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior, message_prefixed);
}

You can find such reasons in the same code base by searching for 'Misbehaving' keyword.
legendary
Activity: 2968
Merit: 3684
Join the world-leading crypto sportsbook NOW!
This will guarantee that the transaction is added to the local node's mempool, assuming it is a valid transaction Tongue

Quickie here.

 And if it is possible for you to configure your node to accept a transaction as valid, for example, a 0 fee tx, what happens then? I mean, other nodes will still reject it (min relay fee not met), right? And that would cause your node to be marked as "bad"? Or is blacklisting manual. In fact, how do nodes get rated if at all?
HCP
legendary
Activity: 2086
Merit: 4361
is it basically possible to make sure that a transaction is broadcasted through my own group of nodes I'm running?
Even if there is some sort of propagation issue stopping the transfer of your transaction across the network... You can 100% guarantee that each of your personal nodes knows about any given transaction by simply using the sendrawtransaction on each node (via bitcoin-cli or console in GUI) passing in the "raw hex" of the transaction.

This will guarantee that the transaction is added to the local node's mempool, assuming it is a valid transaction Tongue
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
I just want you to know that the statement above happens in a blink of an eye so it's pretty pointless to search your own node's mempool for the particular transaction since almost all nodes already included it to their's within a minute.

If you want to check if it was included to your mempool, use this command (and find that specific tx id):
Code:
getrawmempool

But it's the same as searching from online blockexplorers.
full member
Activity: 434
Merit: 101
YouTuber, gambler, and scam-buster.
When you broadcast a transaction on the bitcoin network (basically, when you hit the send button), it propagates through the various nodes, starting from the closest and eventually reaching the farthest. If you have a cluster of bitcoin nodes in a central location and you send a transaction using one, then all of the other nodes will be the first nodes to pick up the transaction in their respective memory pools.
member
Activity: 133
Merit: 34
Hi all,
is it basically possible to make sure that a transaction is broadcasted through my own group of nodes I'm running?

Thanks.
Jump to: