-
Notifications
You must be signed in to change notification settings - Fork 37
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
URL fixes, documentation improvements #52
Conversation
…the over-zealous "bitcoin" -> "BGL" search-replace has resulted in these making no sense, and containing many broken links
…n->BGL search-replace)
…n by dumb bitcoin->BGL search-replace)
… are broken links as they have been copied from bitcoincore.org and the equivalents do not exist at bitgesell.ca currently
…itcoin-core/gui repository
Hi @slowriot ! There's some good stuff done (saw other PRs as well), thanks. Please give me a few days to review it. |
Thanks. I realise they're big changes that touch a lot of files, so please take your time - there's no hurry on my side. I'll aim to start making more improvements shortly - I'm focusing on getting more of the test suite to pass first, once that's done it'll be a lot easier for approvers to verify that a change hasn't broken anything. |
Would you mind concentrate on miner_tests.cpp unit test? |
Okay, I've had a look at the miner test, and the total failures are interesting - the new created block fails validation so the tests don't even get to start. Digging into the history of the repo, I suspect some of this issue goes back to the very first commit. Unfortunately there is no detailed commit history between the initial fork from bitcoin, but it looks like bitgesell was forked from somewhere near 0cda5573405d75d695aba417e8f22f1301ded001 of the bitcoin repo. The commit marked as "Initial publish of bitgesell" actually contains a number of differences from this fork point which are worth looking at. Comparing bitcoin's chainparams.cpp with chainparams.cpp in bitgesell's initial commit, I see a lot of changes that don't make a great deal of sense to me: Here is a full online diff of chainparams.cpp: https://editor.mergely.com/EcqOlxpk/ Is anyone able to walk through and explain the rationale for each of the original changes in this diff? Without understanding the exact intention behind them, it is hard for me to see which constitute intended behaviour (i.e. the tests should be changed to accomodate them), and which are actually just introducing unintended bugs (i.e. they should be reverted to fix the tests). For example, zeroing Looking forward to clarification on this. |
Give me some time, I would get back to you. |
The For pchMessageStart: The below are not needed because BGL has by default inherited those features:
The main issue out there is Genesis nBits that was not based on powLimit. But I strongly believe that there should be a way out to clean up miner_tests.cpp and get it to pass. consensus.nMinimumChainWork and consensus.defaultAssumeValid change at update. And forking Bitcoin code is like update. The value of nMinimumChainWork is the lowest at Genesis(difficulty 1). defaultAssumeValid is used to confirm the best chain ancestors. If you have further questions, don't hesitate to ask. For more information, please check out references the below: https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-part-2-59b9eddb49a4 |
Thanks for the fast and detailed reply. Having now had time to look at this in more depth, I can see a number of problems mostly related to these changes (for example, the prefixes, and the pubkey) that have been related to a number of tests which have been failing so far. Unfortunately, it looks like some developer attempted to work around the test failures by messing with the base58 implementation (which I addressed in PR #53) - fixing this actually breaks some other tests (several in key_tests), and I now understand why. The base58 implementation itself had been poorly modified to allow prefix-10 addresses to decode as if they were prefix-0 addresses - a terrible idea - which almost worked (but not quite), and had many knock-on effects elsewhere. What's worse, correct tests were modified, which would previously have failed, so that they pass despite incorrect output from this implementation. I'm about to raise another PR to fix some of these issues, but all of this work will be predicated on PR #53, which is needed to get a correctly working base58 implementation again - many things will be broken across the codebase in small ways until that is merged. Looking at the miner test, it fails to accept the genesis block, on the grounds that proof of work failed. As you say, the fact that nbits did not take the POW limit into account, means that it's likely the genesis block's hash is greater than the POW bits, meaning it cannot logically have been mined with the current POW limit. This is a great example of why it's a bad idea to release to the public while ignoring failing tests ;) But I agree with you that it should be possible to work around this in the tests and elsewhere, so I'll aim to do that. I'll pick off some of these issues over the coming days and work my way towards the miner test in the process. |
@slowriot please check out janus branch. Virtually all the major unit tests failures are already resolved or partially resolved except miner_tests and transaction_tests. Concentrate on these. I would add more to the list later today. Don't hesitate to ask questions. |
Pending unit tests(ones still failing)
|
Hi @slowriot Thanks for the contribution, tx is: |
@slowriot |
Noted, thanks. I hadn't realised development was more advanced on a branch other than master. I would suggest merging #53 to master in any case, as any development work by other contributors done on master will inevitably be broken until that is resolved - although I recognise now that the same solution has also been independently implemented on your branch. I will target any further PRs against the janus release branch. |
|
If you're looking at Additionally to your list, I note that |
|
|
Please stick to Keccak wherever it is used. We are not looking for quick-fix. |
As explained in detail on the other thread at #59 (comment):
You say "we are not looking for a quick fix" which is precisely why I made the change in this way - the design of addrman in bitcoin is based around probabilistic bucket distributions which are derived from the nature of the algorithm used; if the algorithm is changed arbitrarily, you lose that probabilistic distribution, and buckets can become skewed. This fixes the algorithm, rather than adjusting the tests to match a broken algorithm. A "quick fix" solution here would instead accept the inferior algorithm, and change the tests so that they pass regardless. If that is actually what you want, please let me know, and I will provide an alternative pull request - but please note that forcing your non-conformant algorithm derived vaguely from a keccak base here will only result in an insecure addrman implementation that is vulnerable to denial of service attacks due to bucket imbalance. |
Let's go with Keccak. |
Before I begin work on this, can I please confirm that you are a maintainer of this project who is authorised to make such a decision, and that the project stakeholders understand that you are asking me to adjust failing tests to pass for a faulty algorithm, rather than implementing a valid algorithm for valid tests? Are all parties aware of the security implications of altering the addrman cheaphash algorithm and the loss of assurances about balance of buckets that it entails? If so, I'll proceed for the bounty, but my professional advice is not to take this route. |
0d624261ef Merge bitcoin-core/crc32c-subtree#2: Merge upstream cac7ca830b Merge commit 'fa5ade41ee480003d9c5af6f43567ba22e4e17e6' into bitcoin-fork fa5ade41ee Fix compilation warnings on ARM64 with old GCC versions. (#52) db08d22129 Updated Travis-CI configuration. (#51) e31619a5b7 Fix GitHub links. (#50) 7fa4c263e8 Update Travis CI config. (#49) a3d9e6d1a4 Updated third_party/ and Travis CI config. (#48) git-subtree-dir: src/crc32c git-subtree-split: 0d624261ef83ab08c953c196540ed18f355add4c
Description
Many URLs in documentation and comments have been broken by a mass search-replace of the word
bitcoin
with the wordBGL
. This PR does the following:BTC/BGL PR reward address
ETH/USDT: 0x50b92AB67A3D3DE8c3506D9287893D9a52655486