Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user configurable blocksize option #1

Closed
wants to merge 23 commits into from

Conversation

core-bitcoin
Copy link

Hey there,

I made this mostly for myself, because I was sick of people telling me I am a terrorist
for running BU or that I am trying to destroy Bitcoin... But your repo looked empty, maybe you also want it?

This is the user configurable blocksize setting from bitcoin classic, the clientversion
stuff comes from the bip100 pull request, because somehow classic changed
a lot there and has a new file Application.cpp I could not figure out how to do this myself :).

And in the bip100 PR it defaulted to 64bit int, but the classic stuff has 32bit int, so I changed it also to 32bit. This should still be plenty enough blockspace for now...

So far it seems to work fine, compiles and runs, it shows the EB value in useragent on a different node if I call getpeerinfo. I also mined a few blocks in -regtest mode and they seem to contain the EB value.
But I have not actually tried to create >1MB blocks yet, this surely needs some review and testing.

Also there are like 2 cosmetic errors: I could not figure out where to place
std::vector<unsigned char> m_coinbaseComment; in miner.h, it either failed with not declared errors or it seemed to declare it multiple times somehow, not sure what I was doing wrong there. So I just placed it at the top of miner.cpp ... Also apparently while trying around with this by accident I deleted a whitespace in miner.h (oh well).

Right now the PR shows a few extra commits from core, because my repo is some commits ahead. It should only show my commits, if you do a git pull & git push first.

greetings from the core-bitcoin (lol)

laanwj and others added 23 commits March 5, 2017 09:29
Instead of the WIN32-specific workaround, detect lack of `MSG_DONTWAIT`
in the build system. This allows other platforms without `MSG_DONTWAIT`
to work too.
Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that
use them (`net.cpp` and `netbase.cpp`), instead of compat.h which is
included all over the place.

This avoids putting them in the global namespace, as defining them as 0
is a hack that works for our specific usage, but it is not a general
solution.

Also makes sure they are defined only once so the `!defined(MSG_x)` guard can go.
`u_int` is not available on some platforms (not sure what standard it's
supposed to be part of), we don't use it anywhere else, and it doesn't
hurt to simply write `unsigned int` out here.
Commit 9db8eec improved the
assert_raises_jsonrpc() function for better testing of RPC failure
modes. This commit completes the job by removing remaining broken
try-except RPC testing from the individual test cases and replacing it
with calls to assert_raises_jsonrpc().
…n the default fee warning

a3ca43b [trivial] Fix a typo (introduced two days ago) in the default fee warning (practicalswift)

Tree-SHA512: b88bb45cb0cbe7f0b0c1dd5d573dad36f3915b1ddde58c9b29806544c832c4a2c0a7994080a57682684f1dea0a02d5367aed8ccbee331dbc40c45948392e0f3d
1eff6c6 fix gitian doc example typo (Lawrence Nahum)

Tree-SHA512: a43b91eb746ebee30810447a697495f97bc8ed0b052b1255b2e34b3ba9a7ca7e904ea45fe6f88029abbb461a539949139efcf5f2de7b3604114e793b27a506f5
b26ea0a specify blockchain size & default behaviour (over pruning) (Mike van Rossum)

Tree-SHA512: f21e1ea0df66500f9f899c429984e7c3de6d1cb1a216f2784061731fe22d5b8e9e48042dfc9db3c92adc6d6b6bb0c2578ca431fe5268b2a907ee2c0fdb60b4c5
fb6f90a Initialize nRelockTime (Patrick Strateman)

Tree-SHA512: 82675ab4b05d5f3ea08a99e85d3f49d18068887d23cbacb5e899ad66799049c5f1d5bd33768dbe153116424c9f0caddaa3622000924e373aa01ac2a54b5f3577
…9707)

c9bd0f6 Fix RPC failure testing (2 of 2) (John Newbery)

Tree-SHA512: df30e6e85abe8c4e12910dc60699f1201e9c243457abd738c1fdeac45f0ff05c674f68619ad9a47c847ec557954007d672cd89d3a9a3b2398dd188d9ffa6dcc9
…NOSIGNAL

a4d1c9f compat: use `unsigned int` instead of `u_int` (Wladimir J. van der Laan)
25da1ee build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locally (Wladimir J. van der Laan)
c459d50 build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL (Wladimir J. van der Laan)

Tree-SHA512: 60d79d69439bb181465e4244aa5ddc28bbd84f69c0ca0c753956b3798c9022394e29d791bc085fe7ffb1268c64c789a57e24797daad63525bb776088188ff9ae
This adds an user configurable blocksize option, to
help the bitcoin network find a market based equilibrium.

It is mostly based on Tom Zander's commit to bitcoinclassic:
5c132f0

The clientversion stuff was borrowed from the bip100 pullrequest:
https://github.com/bitcoinxt/bitcoin/pull/1/files
This adds some warnings to the log file should there be issues with a
misconfigured block-size-accept-limit.
Also change DEFAULT_BLOCK_ACCEPT_SIZE constant from a float to an int32_t
it seems upstream unexposed mapArgs in
4cd373a

This changes mapArgs into GetArg
@blocktracker
Copy link

We're initially planning to base off of the 0.14 branch initially, can you make this PR against the 0.14 branch instead of master?

@core-bitcoin
Copy link
Author

Sure no problem, I run my node right now also based of the 0.14 branch :)
Closing here and will reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet