-
Notifications
You must be signed in to change notification settings - Fork 100
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
Fix-RpcNep5Tracker, prevent it from leveldb bug. (2x) #139
Conversation
What's this? |
@erikzhang We found if new a variable for ExtraGas evertime when execute ApplicationEngine.Run(), it will cause the bug of leveldb. Details please see here. neo-project/neo-node#472 |
This doesn't seems related to levelDB :S |
At first, I'm not sure. But when I saw the issue reproduced again, I just try to readjust it. And I test it several times, it truely avoids this issue. I resync the node within this version, it works stablely. |
Maybe was a random error. Because this change seems that only change the scope of a variable not related with LevelDB. |
@shargon Could you try to sync two nodes on mainet to the latest height on two different server with previous one and this one installed. You'll find the previous one will crash because of no space on disk and this one runs stablely. I think it's not a random error. |
RpcNep5Tracker/RpcNep5Tracker.cs
Outdated
@@ -35,6 +35,7 @@ public class RpcNep5Tracker : Plugin, IPersistencePlugin, IRpcPlugin | |||
private uint _maxResults; | |||
private bool _shouldTrackNonStandardMintTokensEvent; | |||
private Neo.IO.Data.LevelDB.Snapshot _levelDbSnapshot; | |||
private Fixed8 maxGas = Fixed8.FromDecimal(100000000m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private const?
I am not sure, @superboyiii, however, your tests are usually always right! ahuehaeahuea If it solves something I think you should proceed because there is not a notorious danger on this. |
Limit maxGas
@vncoelho Hey, Vitor, my man. Thanks for your trust. This story begins here: google/leveldb#320.
|
RpcNep5Tracker/RpcNep5Tracker.cs
Outdated
@@ -35,6 +35,7 @@ public class RpcNep5Tracker : Plugin, IPersistencePlugin, IRpcPlugin | |||
private uint _maxResults; | |||
private bool _shouldTrackNonStandardMintTokensEvent; | |||
private Neo.IO.Data.LevelDB.Snapshot _levelDbSnapshot; | |||
private Fixed8 maxGas = Fixed8.FromDecimal(1m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private Fixed8 maxGas = Fixed8.FromDecimal(1m); | |
private static readonly Fixed8 maxGas = Fixed8.FromDecimal(1m); |
Please test it. |
Surely, @superboyiii, my pleasure. Give me some couple of days. |
We can upgrade leveldb in order to prevent future issues |
@shargon Yes, that's the best solution. Please take a look at here. neo-project/neo-node#472 @Ashuaidehao has already build the latest leveldb library, and we've test it on three different OS: Win10,Ubuntu 16.04 and MacOS. We've made regression functional and rpc test, all pass. The final step we have to do is compare it with previous data to ensure it's compatible. @nicolegys is doing this, it will take several days, let's wait for it. |
Bootstrap is available. Recommend to use bootstrap. |
@superboyiii, can we merge it? I did not had time to test. However, the change is trivial and does not produces any danger. |
If merged, perhaps we need to port to master branch. |
Fix-RpcNep5Tracker, prevent it from leveldb bug.