Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Revert the restrictions of NUMEQUAL and NUMNOTEQUAL #126

Merged
merged 1 commit into from
Apr 13, 2019

Conversation

erikzhang
Copy link
Member

@erikzhang erikzhang commented Apr 12, 2019

In NEO 3.0, we need to keep the restrictions on NUMEQUAL and NUMNOTEQUAL. So, from now there will be two master branches: master is for NEO 3.0, and master-2.x is for NEO 2.x.

Closes #123

@erikzhang erikzhang requested a review from shargon April 12, 2019 05:10
@erikzhang
Copy link
Member Author

@wowoyinwei Please test this pr for NNC.

@codecov-io
Copy link

Codecov Report

Merging #126 into master-2.x will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##           master-2.x     #126      +/-   ##
==============================================
- Coverage       80.56%   80.54%   -0.02%     
==============================================
  Files              45       45              
  Lines            4584     4580       -4     
==============================================
- Hits             3693     3689       -4     
  Misses            891      891
Impacted Files Coverage Δ
src/neo-vm/ExecutionEngine.cs 99.57% <ø> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0f8090...51f5911. Read the comment docs.

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check this a little bit more.

@vncoelho
Copy link
Member

I like this idea of two masters, @erikzhang, which one will generate the current release of the NEO core?

I am testing the storage changes, I need some more couple of time.

Copy link
Contributor

@igormcoelho igormcoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.
I think we should abolish these opcodes as soon as possible (for Neo 3.0), and keep only bytearray comparison.
To ensure numbers are correct, we could enforce this with previous arithmetic expressions or a CAST opcode (to make sure stackitem is that).

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still verifying storage inconsistencies.

The script is now ready and syncing the testnet.

image

@vncoelho
Copy link
Member

diff -rq StorageBase StorageNew | grep diff
Files StorageBase/BlockStorage_400000/dump-block-372426.json and StorageNew/BlockStorage_400000/dump-block-372426.json differ
Files StorageBase/BlockStorage_400000/dump-block-373083.json and StorageNew/BlockStorage_400000/dump-block-373083.json differ
Files StorageBase/BlockStorage_400000/dump-block-373135.json and StorageNew/BlockStorage_400000/dump-block-373135.json differ
Files StorageBase/BlockStorage_400000/dump-block-373168.json and StorageNew/BlockStorage_400000/dump-block-373168.json differ
Files StorageBase/BlockStorage_400000/dump-block-373299.json and StorageNew/BlockStorage_400000/dump-block-373299.json differ
Files StorageBase/BlockStorage_400000/dump-block-373525.json and StorageNew/BlockStorage_400000/dump-block-373525.json differ
Files StorageBase/BlockStorage_400000/dump-block-373747.json and StorageNew/BlockStorage_400000/dump-block-373747.json differ
Files StorageBase/BlockStorage_400000/dump-block-373757.json and StorageNew/BlockStorage_400000/dump-block-373757.json differ

For example, with this PR:
[{"block":372426,"size":1,"storage":[{"state":"Added","key":"722d11f8132b15c1aec1f2cf39b7ea597ffbfdda0354ae498221046c666efebbaee9bd0e00b4823469c98e748494a92a71f346b1a600610000000000000000000000000000000f","value":"0002102700"}]}]

The current master:
[{"block":372426,"size":0,"storage":[]}]

@vncoelho
Copy link
Member

vncoelho commented Apr 12, 2019

Here are the scripts for neo-cli clients assert.

Right now it is just checking storage differences.
However, we can include any other type of verification, as well as performance in responding to queries or syncing.

https://github.com/NeoResearch/neo-tests/tree/master/clients-assert-testnet

@vikkkko
Copy link

vikkkko commented Apr 13, 2019

@wowoyinwei Please test this pr for NNC.

Using this pr to resynchronize the data , the NNC contract can be found correctly.

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

Successfully merging this pull request may close these issues.

6 participants