project-bitmark / bitmark

Bitmark Core
The Unlicense
47 stars 33 forks source link

The network does not appear to fully agree #116

Open melvincarvalho opened 3 years ago

melvincarvalho commented 3 years ago

Just tracking messages of this kind:

Been running a btm server for several days now, I use it to send tx. Normally it works fine, but today I got:

error: {"code":-2,"message":"Safe mode: Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."}

OS : Ubuntu 20.04 Codebase: https://github.com/dbkeys/bitmark/tree/ssl-only

I guess this is some teething problems with the 20.04 build, good to keep an eye on it and track in this issue

Related issues: https://github.com/project-bitmark/bitmark/issues/108 https://github.com/project-bitmark/bitmark/issues/107

melvincarvalho commented 3 years ago

Adding some logs:

2021-05-06 19:06:44 ProcessBlock: ACCEPTED
2021-05-06 19:07:39 UpdateTip: new best=000001769b5916a9e85ff4acf22ef17ba5dfc9a6fb4d9b63a10e13ede66d038d  height=1175163  log2_work=84.439413  tx=1945224  date=1620328058 progress=1.000000 nbits=503455826 algo=6
2021-05-06 19:07:39 CheckForkWarningConditions: Warning: Large valid fork found
  forking the chain at height 1175143 (6e41325433e55de86955c488d2631e3ad951ccb07a017925414e2dd4959082e4)
  lasting to height 1175144 (1da292e9ea3f37f5759dcc8a191b662746c4cf44c2748b487fea2f108d6e43d8).
Chain state database corruption likely.
melvincarvalho commented 3 years ago
./bitmark/src/bitmark-cli getinfo
{
    "version" : 90704,
    "protocolversion" : 70003,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 1175178,
    "timeoffset" : 0,
    "connections" : 75,
    "proxy" : "",
    "pow_algo_id" : 0,
    "pow_algo" : "SCRYPT",
    "difficulty" : 2246452181.19116163,
    "difficulty SCRYPT" : 2246452181.19116163,
    "difficulty SHA256D" : 7067865652.45480156,
    "difficulty YESCRYPT" : 22831.97888038,
    "difficulty ARGON2" : 24577.19794067,
    "difficulty X17" : 6502.85898565,
    "difficulty LYRA2REv2" : 1123942999.17083907,
    "difficulty EQUIHASH" : 14697.00421971,
    "difficulty CRYPTONIGHT" : 4877.20763695,
    "moneysupply" : 14951191.96636479,
    "testnet" : false,
    "keypoololdest" : 1618579250,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."
}
melvincarvalho commented 3 years ago

Update: i tried to kill bitmarkd a few times but it would not shut down

after I did a kill -9 on it and restarted it, it started working again

I'll report if it happens again ...

melvincarvalho commented 3 years ago

I'll note at the same time the message is on the chainz explorer:

image

https://chainz.cryptoid.info/marks/

bitmarkcc commented 3 years ago

Yes I will work on fixing this soon. I think its because some algos have much more work per block than others, even when weighted.

Alarmod commented 3 years ago

Any fixes? Wait for windows release. Current sources compiled for WSL working fine. Please, compile standealone version for windows.

bitmarkcc commented 3 years ago

The fix for this has been on the master branch since 2 years. So I don't recommend running v0.9.7.2. I recommend master branch from last year. The current master branch is a bit unstable with some minor bugs but still decent as well.

We had a guy compiling Windows builds before, I can try but Im more into Linux. Can't you make a Linux mining pool and connect with Windows?

I am working on the next release (scheduled to be released in August). My latest work for this is on https://github.com/akrmn2021/bitmark/tree/0.9.7.4. If you give me a few days I can compile for Windows and you can test. It depends on my internet connection. I live outside of the city and still need more hardware.

Here I will paste what I wrote in a telegram chatroom regarding this network agreement issue:

22 [14 Jun] Bitmark Development A K »»» The problem with network agreement is simple. The warning condition is triggered when the work of a fork is more than 6 times the work of the current block. But with multi algo, each algo has a drastically different difficulty (work per block).

So if for example the current block at the tip is a CRYPTONIGHT block, the difficulty for that algo is currently 4440.93605865. So if there is a fork just 1 block deep with SHA256 for example (diffulty 11693986072.07068253), then that's already much more than 6 times the work. And yes, Im taking into account the weights of the algos, so by difficulty I mean weighted difficulty.

So this warning message will keep triggering non stop on v0.9.7.2. I'm quite sure it will block the rpc calls, and people can't mine or use the chain like that. I heard many complaints of this warning message, because people were using 0.9.7.2. With the master branch (which fixed that 2 years ago), I never saw this message.

By the way the fix involves using an average difficulty over 50 blocks and a higher threshold for the fork condition since 6 bitcoin blocks is like 20-30 bitmark blocks.

Alarmod commented 3 years ago

Now I use WSL build for windows for CRYPTONIGHT, all OK. I tried build codes with Cygwin. Compiled… But don’t work all functions… Some library issues, maybe. I don’t know as create cryptonight pool…

OK, I wait windows version.

Alarmod commented 3 years ago

New version?

melvincarvalho commented 3 years ago

hi @Alarmod we've been a bit snowed under of late, generally organizing things and coming up with a new dev process along with a freeze, to ensure that everything works

long-term aim is to get things in good shape by end of year, but things may happen sooner, such as a specific windows, release -- we lately tested on the latest mac hardware too

the general aim is that we keep bitcoin as an upstream project, and follow their work, as we feel that's the project with the best oversight, integrity, track record etc.

as we are smaller, we also want to add our own innovation which is mPoW which could stand alone as a BIP, and maybe even be pitched upstream one day, you never know!

that involves getting all our current docs up to date so we know how things work

we're starting with the CEM, but there's also the mPoW, and the resurrector calcs, plus we are charting the emissions to show how they match the original project goals, that we are provably fair, no premine, ico, dev tax etc.

with this in place, we can make an new issue out of @akrmn2021 proposal and figure out the scope of the change, get it out for review etc. or if there's a release that doesnt change consensus, around the 9.4 branch document that too, we have a slight issue with an failing unit test at the moment, so we need to document that too

ideally we'll cleanly segment all our changes, issues, and PRs, have a smooth history that can be audited, and match the relevant bitcoin code modulo mPoW, which will have it's own BIP (or 3 BIPs perhaps)

after that I think we'll have things fixed up pretty well, and clear coordinated dev process, and history...

bitmarkcc commented 3 years ago

Just installed my new Internet connection :) I will start working again on making a Windows release. Let's see...

On Wed, Aug 11, 2021 at 9:05 PM Melvin Carvalho @.***> wrote:

hi @Alarmod https://github.com/Alarmod we've been a bit snowed under of late, generally organizing things and coming up with a new dev process along with a freeze, to ensure that everything works

long-term aim is to get things in good shape by end of year, but things may happen sooner, such as a specific windows, release -- we lately tested on the latest mac hardware too

the general aim is that we keep bitcoin as an upstream project, and follow their work, as we feel that's the project with the best oversight, integrity, track record etc.

as we are smaller, we also want to add our own innovation which is mPoW which could stand alone as a BIP, and maybe even be pitched upstream one day, you never know!

that involves getting all our current docs up to date so we know how things work

we're starting with the CEM, but there's also the mPoW, and the resurrector calcs, plus we are charting the emissions to show how they match the original project goals, that we are provably fair, no premine, ico, dev tax etc.

with this in place, we can make an new issue out of andrew's proposal and figure out the scope of the stage, get it out for review etc. or if there's a release that doesnt change consensus, around the 9.4 branch document that too, we have a slight issue with an failing unit test at the moment, so we need to document that too

ideally we'll cleanly segment all our changes, issues, and PRs, have a smooth history that can be audited, and match the relevant bitcoin code modulo mPoW, which will have it's own BIP (or 3 BIPs perhaps)

after that I think we'll have things fixed up pretty well, and clear coordinated dev process, and history...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/project-bitmark/bitmark/issues/116#issuecomment-897077613, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATNGYFADJJ3WHZ67ZTJTA53T4LCYTANCNFSM44HV27HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Alarmod commented 3 years ago

New windows version?

bitmarkcc commented 3 years ago

Appologies but currently have some unexpected legal issues to deal with. I think in 2 weeks ill be back to work.

On Sat., Oct. 2, 2021, 5:55 a.m. Alarmod, @.***> wrote:

New windows version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/project-bitmark/bitmark/issues/116#issuecomment-932676213, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATNGYFBOFXMG3WCMLB47U2DUEZ7ENANCNFSM44HV27HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Alarmod commented 2 years ago

Any news?

melvincarvalho commented 2 years ago

@Alarmod thanks for the bump

@akrmn2021 was away for a bit dealing with things, but we chatted more recently

He's keen to prioritize a windows release. We just need to ensure it's tested to the extent that the network stays together. Perhaps something you could help with

In general we are quite thinly spread, on the chain layer. But in some ways it could be a good thing, that we know that. Meaning we can defer all decision making to upstream bitcoin, and put our resources behind our single innovation, which is MPOW. Testing it, auditing it, documenting it, keeping it up to date etc. Our main work is on marking at a layer above

I've been testing wallets the last 6 months from the master branch on ubuntu 20.04 and it seems to be working well, the occasional restart is needed every 1-2 months. I think there's a will to put mpow through an audit by the time we get to the end of this epoch, which will be some time next year

A round of wallet testing I think would be good to consolidate further in April when ubuntu 22.04 comes out, ensuring that we compile cleanly there with open ssl v3 and also windows and mac builds work consistently with the network

I think that seems to be practical goals for the next year

bitmarkcc commented 2 years ago

My branch https://github.com/akrmn2021/bitmark/tree/0.9.7.4 is ready for testing. It works well on Ubuntu AMD64 and raspberry pi 64. I am now trying to compile for windows...

On Fri, Dec 17, 2021 at 7:42 PM Melvin Carvalho @.***> wrote:

@Alarmod https://github.com/Alarmod thanks for the bump

@akrmn2021 https://github.com/akrmn2021 was away for a bit dealing with things, but we chatted more recently

He's keen to prioritize a windows release. We just need to ensure it's tested to the extent that the network stays together. Perhaps something you could help with

In general we are quite thinly spread, on the chain layer. But in some ways that could be a good thing, that we know that. Meaning we can defer all decision making to upstream bitcoin, and put our resources behind our single innovation, which MPOW. Testing it, auditing it, documenting it, keeping it up to date etc. Our main work is on marking at a layer above

I've been testing wallets the last 6 months from the master branch on ubuntu 20.04 and it seems to be working well, the occasional restart is needed every 1-2 months. I think there's a will to put mpow through an audit by the time we get to the end of this epoch, which will be some time next year

A round of wallet testing I think would be good to consolidate further in April when ubuntu 22.04 comes out, ensuring that we compile cleanly there with open ssl v3 and also windows and mac builds work consistently with the network

I think that seems to be practical goals for the next year

— Reply to this email directly, view it on GitHub https://github.com/project-bitmark/bitmark/issues/116#issuecomment-996940273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATNGYFFRKGRIYWDLERKF65TUROADFANCNFSM44HV27HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

melvincarvalho commented 2 years ago

Just tracking messages of this kind:

Been running a btm server for several days now, I use it to send tx. Normally it works fine, but today I got:

error: {"code":-2,"message":"Safe mode: Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."}

OS : Ubuntu 20.04 Codebase: https://github.com/dbkeys/bitmark/tree/ssl-only

I guess this is some teething problems with the 20.04 build, good to keep an eye on it and track in this issue

Related issues: #108 #107

Back to topic

Still getting this issue from time to time. Three times in a month

Some further debugging:

error: {"code":-2,"message":"Safe mode: Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."}
2022-07-16 08:36:24 CheckForkWarningConditions: Warning: Large valid fork found
  forking the chain at height 1479677 (0002087a9b25747a743793233ef5b2606fb7f39374e5e7ffb172ba2338b973ee)
  lasting to height 1479678 (18e9104d0a1d5390dde65cb33f3464b3d64ca98c6e700dd547d064f210e59f84).
Chain state database corruption likely.

From the explorer:

https://chainz.cryptoid.info/marks/block.dws?1479677.htm https://chainz.cryptoid.info/marks/block.dws?1479678.htm

7/16/2022, 9:55:58 AM (UTC+2:00) 7/16/2022, 9:56:14 AM (UTC+2:00)

they are 16s apart

Alarmod commented 2 years ago

My own build for WSL Ubuntu 20.04 with latest git patches stable. Still wait for windows stable build