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

Some block hashes are shown in reverse order #596

Open
Leonardiae opened this issue Nov 5, 2021 · 1 comment
Open

Some block hashes are shown in reverse order #596

Leonardiae opened this issue Nov 5, 2021 · 1 comment
Labels
daemon Daemon Related Issues

Comments

@Leonardiae
Copy link
Collaborator

Using: BTCSQ Core version v0.19.99.0-9fa6fa0

Some block hashes are shown on the console in reverse order. For example block 12773 has hash 000000000000021d21309939d1cf9c0b601aabcde1783d471ded9b5633cea5d3 but is also shown as d3a5ce33569bed1d473d78e1cdab1a600b9ccfd1399930211d02000000000000.

2021-11-05T13:04:39Z [alt-cpp] [warn] comparePopScore: Comparing two chains. Current tip: ALT:12772:be71475c1385f9d277cbb038b48baad14260a78a4ea8661d5e04000000000000, Candidate: ALT:12773:d3a5ce33569bed1d473d78e1cdab1a600b9ccfd1399930211d02000000000000. Result: Candidate wins (-1), reason: candidate is valid and after current tip. 2021-11-05T13:04:39Z UpdateTip: new best=ALT:12773:000000000000021d21309939d1cf9c0b601aabcde1783d471ded9b5633cea5d3 VBK:2661385:000000000709b49377122b104446d1d61c0dc609643abaaf BTC:708319:00000000000000000002eb8079bd51ab39235269d0b288ff637599e3667023eb version=0x20080000 log2_work=68.686958 tx=15631 date='2021-11-05T13:03:02Z' progress=0.999943 cache=0.1MiB(1025txo) 2021-11-05T13:04:39Z [alt-cpp] [info] acceptBlock: Accept pop data: PopData{VBKs=2, VTBs=0, ATVs=38, version=1}, for the block: ALTBlockIndex(height=12774, hash=91e5ce459933d4c9c4537efd8b46c470fdb8155495531a75b402000000000000, next=0, status=1, header=AltBlock{height=12774, hash=91e5ce459933d4c9c4537efd8b46c470fdb8155495531a75b402000000000000}, ATVs=0[], VTBs=0[], VBKs=0[]) 2021-11-05T13:04:39Z [alt-cpp] [warn] comparePopScore: Comparing two chains. Current tip: ALT:12773:d3a5ce33569bed1d473d78e1cdab1a600b9ccfd1399930211d02000000000000, Candidate: ALT:12774:91e5ce459933d4c9c4537efd8b46c470fdb8155495531a75b402000000000000. Result: Candidate wins (-1), reason: candidate is valid and after current tip.

@timstall timstall added the daemon Daemon Related Issues label Nov 5, 2021
@Warchant Warchant added this to the MainNet milestone Nov 15, 2021
@Warchant
Copy link
Collaborator

Warchant commented Nov 15, 2021

It is known issue. In short, we won't fix it in short/mid term, because it is only a "display" issue, not logic issue.
Fix for this may sound simple, but it is not.
It will hurt in long-term because some altchains may not put their hashes in "reversed" order to alt-integration-cpp.

Blame Satoshi Nakamoto for reversing hash in uint256 implementation in Bitcoin.

@Warchant Warchant removed this from the MainNet milestone Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
daemon Daemon Related Issues
Projects
None yet
Development

No branches or pull requests

3 participants