Bitcoin Forum
May 05, 2024, 05:41:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Compile and run a "rude" full node - tips wanted!  (Read 131 times)
BTCW (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 193
Merit: 235

Click "+Merit" top-right corner


View Profile
July 07, 2020, 03:34:12 PM
 #1

I want to run a "rude" Bitcoin full node. As an experiment. Will build from source and run on a decent machine with a backbone fiber connection.

(For clarity, this has nothing to do with just pimping the config-file.)

Looking at the source code for Bitcoin core, my first changes will be to modify IsStandard() and IsStandardTx() in

https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp

to always return "True", i.e. I want to relay all kinds of ugly transactions to the network, and not have any of them deleted from my mempool.

What else can we think of?

Hm, fees. I don't my node to say no to zero satoshi transaction fees. What do I change here (and/or elsewhere)?

https://github.com/bitcoin/bitcoin/blob/master/src/policy/fees.cpp

What more... the maximum number of different sorts connections needs to be addressed, here:

https://github.com/bitcoin/bitcoin/blob/master/src/net.h

I'm thinking that several numbers must be changed here, especially the two values that end with "=8" (I can't write the names of the functions out, Cloudflare - interestingly - blocks me when I try to write them) should be changed to "=500" or so.

So far and in conclusion, I have: Whack "IsStandard", allow zero satoshi tx fees, and increase the number of allowed simultaneous connections to big numbers.

Your turn! Hit me with suggestions what a "rude" node should do (and please point me to the right places in the source code).

SendBTC.me <<< amazing imitative
1714887660
Hero Member
*
Offline Offline

Posts: 1714887660

View Profile Personal Message (Offline)

Ignore
1714887660
Reply with quote  #2

1714887660
Report to moderator
1714887660
Hero Member
*
Offline Offline

Posts: 1714887660

View Profile Personal Message (Offline)

Ignore
1714887660
Reply with quote  #2

1714887660
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714887660
Hero Member
*
Offline Offline

Posts: 1714887660

View Profile Personal Message (Offline)

Ignore
1714887660
Reply with quote  #2

1714887660
Report to moderator
1714887660
Hero Member
*
Offline Offline

Posts: 1714887660

View Profile Personal Message (Offline)

Ignore
1714887660
Reply with quote  #2

1714887660
Report to moderator
1714887660
Hero Member
*
Offline Offline

Posts: 1714887660

View Profile Personal Message (Offline)

Ignore
1714887660
Reply with quote  #2

1714887660
Report to moderator
BTCW (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 193
Merit: 235

Click "+Merit" top-right corner


View Profile
July 07, 2020, 05:07:33 PM
 #2

Addition:

MAX_OUTBOUND_FULL_RELAY_CONNECTIONS and MAX_ADDNODE_CONNECTIONS - found in net.h -

are the two variables I couldn't name in the original post (but seems to be OK as a comment - strange, but let's move on).

Another edit: By "rude" I mean a node with the most relaxed policies you can think of, maybe a bit annoying to other nodes (and probably not cool if everybody does it [but don't see that happening]), but I have no ill intentions - I'm NOT trying to disrupt the P2P network or try and push dodgy transactions on to the blockchain. An experiment, no more, no less.

SendBTC.me <<< amazing imitative
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
July 07, 2020, 06:41:13 PM
Merited by BTCW (1)
 #3

Looking at the source code for Bitcoin core, my first changes will be to modify IsStandard() and IsStandardTx() in

https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp

to always return "True", i.e. I want to relay all kinds of ugly transactions to the network, and not have any of them deleted from my mempool.
It's easier to do this by changing fRequireStandard for CMainParams in chainparams.cpp then starting Bitcoin Core with -acceptnonstdtxn.

What else can we think of?

Hm, fees. I don't my node to say no to zero satoshi transaction fees. What do I change here (and/or elsewhere)?
Start Bitcoin Core with -incrementalrelayfee=0 -minrelaytxfee=0 -blockmintxfee=0 -dustrelayfee=0. You'll probably want to also increase -maxmempool, -limitancestorcount, -limitancestorsize, -limitdescendantcount, and -limitdescendantsize

What more... the maximum number of different sorts connections needs to be addressed, here:

https://github.com/bitcoin/bitcoin/blob/master/src/net.h

I'm thinking that several numbers must be changed here, especially the two values that end with "=8" (I can't write the names of the functions out, Cloudflare - interestingly - blocks me when I try to write them) should be changed to "=500" or so.
You might not want to increase the maximum number of connections. You'll probably run out of file descriptors.

BTCW (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 193
Merit: 235

Click "+Merit" top-right corner


View Profile
July 07, 2020, 07:21:01 PM
 #4

Looking at the source code for Bitcoin core, my first changes will be to modify IsStandard() and IsStandardTx() in

https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp

to always return "True", i.e. I want to relay all kinds of ugly transactions to the network, and not have any of them deleted from my mempool.
It's easier to do this by changing fRequireStandard for CMainParams in chainparams.cpp then starting Bitcoin Core with -acceptnonstdtxn.

What else can we think of?

Hm, fees. I don't my node to say no to zero satoshi transaction fees. What do I change here (and/or elsewhere)?
Start Bitcoin Core with -incrementalrelayfee=0 -minrelaytxfee=0 -blockmintxfee=0 -dustrelayfee=0. You'll probably want to also increase -maxmempool, -limitancestorcount, -limitancestorsize, -limitdescendantcount, and -limitdescendantsize

What more... the maximum number of different sorts connections needs to be addressed, here:

https://github.com/bitcoin/bitcoin/blob/master/src/net.h

I'm thinking that several numbers must be changed here, especially the two values that end with "=8" (I can't write the names of the functions out, Cloudflare - interestingly - blocks me when I try to write them) should be changed to "=500" or so.
You might not want to increase the maximum number of connections. You'll probably run out of file descriptors.

Great! Several solid leads.

Just a comment on the "=500" changes. I already tested and ran a compilation with only those two values changed, and it downloaded the blockchain fast as eff Smiley And my node didn't get IP banned or blacklisted, at least not for the 12 hours or so I left it on. That's when "rude" struck me as a good name for the project.

Alright then, what else can we play with; stuff not already mentioned above?

SendBTC.me <<< amazing imitative
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!