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

Fix/Improve syncing (3x): Adding ping mechanism to TaskManager for replacing StartHeight and PendingKnownHashes strategy #899

Merged
merged 33 commits into from
Dec 1, 2019

Conversation

yongjiema
Copy link
Contributor

Fix #841

@shargon
Copy link
Member

shargon commented Jul 9, 2019

Could you explain the fix?

@shargon shargon changed the title Fix sync stuck Fix sync stuck (3x) Jul 9, 2019
@erikzhang
Copy link
Member

Looks good. We need to test it.

@yongjiema
Copy link
Contributor Author

Could you explain the fix?

This PR is the fix for #841, there have two main reasons caused the issue happen:

  1. Too many duplicate new tasks are queued in the TaskManagerMailbox from each session, but the TaskManager cannot process the mailbox's messages as fast as it was queued, so the mailbox grow bigger and bigger, then the sync slower, and stop sync at last

  2. Another reason is the current node's header reaches the highest one from the connection sessions, but it might not be updated for a long time, the fix is try to get the new headers if the current header equals the highest one and is not updated for a while.

@shargon
Copy link
Member

shargon commented Jul 9, 2019

For the issue 1, is possible to detect what kind of task produce this issue? i like the solution, but maybe we should try to find the sender problem.

@yongjiema
Copy link
Contributor Author

yongjiema commented Jul 9, 2019

For the issue 1, is possible to detect what kind of task produce this issue? i like the solution, but maybe we should try to find the sender problem.

I remember the most duplicate tasks are consensus.

@ZhangTao1596
Copy link
Contributor

Can you create a pr to master-2.x. We want to have a test on NEO2.x.

@codecov-io
Copy link

codecov-io commented Jul 9, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@32a6320). Click here to learn what that means.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #899   +/-   ##
=========================================
  Coverage          ?   64.35%           
=========================================
  Files             ?      200           
  Lines             ?    13746           
  Branches          ?        0           
=========================================
  Hits              ?     8846           
  Misses            ?     4900           
  Partials          ?        0
Impacted Files Coverage Δ
neo/Network/P2P/TaskSession.cs 0% <0%> (ø)
neo/Network/P2P/RemoteNode.cs 40.12% <0%> (ø)
neo/Network/P2P/TaskManager.cs 18.87% <15.78%> (ø)
neo/Network/P2P/ProtocolHandler.cs 23.98% <61.11%> (ø)

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 32a6320...98f11f8. Read the comment docs.

@yongjiema
Copy link
Contributor Author

Can you create a pr to master-2.x. We want to have a test on NEO2.x.

please check #900

@igormcoelho
Copy link
Contributor

Congratulations!! Amazing fix!

@ZhangTao1596
Copy link
Contributor

Community with NGD are testing #900.

@ZhangTao1596
Copy link
Contributor

ZhangTao1596 commented Jul 10, 2019

I also find that if mailbox is crowding with low priority messages, TaskCompleted event will be blocked too.
This even makes things worse. Hight priority task completed event will be blocked too.
NGD have tested and reprodued. I attach logs here. Hope may help analysis. #817

@yongjiema
Copy link
Contributor Author

I also find that if mailbox is crowding with low priority messages, TaskCompleted event will be blocked too.
This even makes things worse. Hight priority task completed event will be blocked too.

Yes, my another fix in my local is try to set the TaskCompleted, HederTaskCompleted and Timer as high priority, but from my testing, it's also working file without the change, but it's a potential problem, I removed this part for the fix as I think it's better have something like a system messages category which have a higher priority in queues (e.g. PriorityMessageQueue)

@vncoelho vncoelho changed the title Fix sync stuck (3x) Improving the request of tasks and dropping duplicated tasks on Akka queue level (3x) Aug 9, 2019
vncoelho
vncoelho previously approved these changes Aug 9, 2019
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.

After testing this for weeks, I am in favor of both changes:

  • Improving the request of tasks
  • Drop duplicated tasks on the Akka queue (in particular, this is good for privatenets)

I edited your description @yongjiema, because I am not sure that it solves #841
This PR is a good fix and improvement, can also be seen as a bug in terms of preventing some kind of natural attacks.

I still believe that we need other minor fine tuning.

Again, congratulations for the finding and great work.

@vncoelho
Copy link
Member

vncoelho commented Aug 9, 2019

@shargon, if you want to apply and test the AsParallel search it also looks good. But I believe that this queue is not much much big, is it?

neo/Network/P2P/ProtocolHandler.cs Outdated Show resolved Hide resolved
neo/Network/P2P/ProtocolHandler.cs Outdated Show resolved Hide resolved
while (pendingKnownHashes.Count > 0)
{
KeyValuePair<UInt256, DateTime> item = pendingKnownHashes.First();
if (DateTime.UtcNow - item.Value <= PendingTimeout)
Copy link
Member

Choose a reason for hiding this comment

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

Use TimeProvider

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Think the code is from the existing project, I did want to change it, but I found many places are using DateTime.UtcNow, so I keep it as the original version.

@@ -16,6 +16,7 @@ internal class TaskSession

public bool HasTask => Tasks.Count > 0;
public uint StartHeight { get; }
public uint LastBlockIndex { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a summary for these properties?

@yongjiema
Copy link
Contributor Author

Another reason is the current node's header reaches the highest one from the connection sessions, but it might not be updated for a long time, the fix is try to get the new headers if the current header equals the highest one and is not updated for a while.

@yongjiema how are you testing this scenario?

I tested on my local private chain.

@shargon
Copy link
Member

shargon commented Nov 14, 2019

But how can I force this scenario?

@lock9 lock9 added enhancement Type - Changes that may affect performance, usability or add new features to existing modules. p2p Module - peer-to-peer message exchange and network optimisations, at TCP or UDP level (not HTTP). labels Nov 17, 2019
@vncoelho
Copy link
Member

@yongjiema, can you merge the PR locally with the current Master?

In addition, @erikzhang is still concerned about shallDrop. However, I believe the shalldrop is really a problem without the pendinghashes.
On the other hand, with the pendinghashes the problem Erik's mentioned may had been solved, right? Could you take a look on that?

@vncoelho
Copy link
Member

vncoelho commented Nov 29, 2019

@shargon and @lock9, these changes were already merged on Master2x.
Thus, I think we should merge this here as soon as possible for: 1) testing it daily with other features; 2) moving forward to the next phases.

UTs can come at any time for these classes, it is a need that any one fulfilled yet and is opens to all of us.

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

The code looks good, but i haven't got time to test it, sorry, I won't block it for merge it

these changes were already merged on Master2x.

The order should be the opposite, first neo 3, then neo2.

@vncoelho
Copy link
Member

I agree with the order, @shargon, better to try the feature on NEO3 first.
I think this was a special case in which we were really trying to improve NEO2. There it had happened in two different occasions. This PR was split there.

@erikzhang erikzhang merged commit 5cb2620 into neo-project:master Dec 1, 2019
Tommo-L pushed a commit to Tommo-L/neo that referenced this pull request Jan 10, 2020
…placing StartHeight and PendingKnownHashes strategy (neo-project#899)
Thacryba pushed a commit to simplitech/neo that referenced this pull request Feb 17, 2020
* Add some questions

* Fixes (neo-project#900)

* update English files and Chinese files

* update
Tommo-L pushed a commit to Tommo-L/neo that referenced this pull request Jun 22, 2020
shargon added a commit that referenced this pull request Nov 1, 2020
* dotnet format (#983)

* Fixes `NeoToken.CalculateBonus()` (#992)

* Small cache changes (#994)

* Cache changes

* Update UT_Cache.cs

* Fixes `GetRegisteredValidators()` (#991)

* Fix/travis parallel jobs (#987)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* split travis jobs

* add -v n

* Fixes #999

* Add and update some Unit tests in IO module (#998)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* update IO module test

* delete empty line

* changename

* delete empty line

* revert commit

* Fix (#1008)

* Fix for 1005 (#1006)

* Fix null values during ChangeViewReason (#1016)

* Avoid processing own hashes (3x) (#1009)

* Avoid processing own hashes

* Shargon's suggestion I

* Shargon's suggestion II

* rename

* Scoped signatures (#968)

* Base

* Check Witness

* Fix some unit tests

* More ut fixes

* Clean code

* Fix more unit tests

* Fake witness for make transfer

* Fix ut

* Simplifying if

* rename to RootAccess

* adding scope type, preparing for cosigners

* reading scope from stream

* attaching CosignerUsage

* calculate scope size

* Finish cosigner usage

* Global constant

* Clean

* AsSerializable @erikzhang

* avoiding empty scope data serialization

* fix logic

* moved scopes to Transaction

* fixed tests

* Change CheckWitness

* Follow the standard

* rename var

* Remove FakeWitness

* Fix cosigner ussage

* Clean

* Fix CosignerUsage

* fix RootAccess

* removed not null

* fixed malformed tx generation

* no need for attribute on all test tx

* testing sizes

* renamed RootAccess to EntryOnly, and explained enum compositions

* discovering which size is wrong

* Remove spaces

* doubts on scope sign test

* removing scopes everywhere

* wrong tx size

* fixed tests

* remove print

* more scope tests

* reorder

* revert changes on Witness

* Modify CheckWitness

* Reduce changes

* Fix Cosigner usage

* Combine CosignerUsage

* Indent

* filtering groups by pubkey

* Organize

* Rename ScriptHash to Account

* renamed EntryOnly to CalledByEntry

* dotnet format

* fix file UT_CosignerUsage

* tests for double cosigners

* assert catch exceptions

* clean and format

* improvements

* Format ut exceptions

* Rename ut

* Remove changes

* Follow comment standard

* Rename to Cosigner

* Move cosigners outside

* Clean comments

* Reorder the parameters

* Fix unit tests

* limit max cosigners by 16 (same as attributes)

* testing non-distinct cosigners

* respect max cosigners

* MaxSubitems

* test CalledByEntry together with GAS

* Update comment

* Clean comments

* Global=0

* Fix ut

* broken test for combination Global | NEO

* back to global 0x80

* global back to 0x00, as default

* Update comment

* Improving the use of `RelayCache` on `ProtocolHandler` (#1014)

* Refactoring and simplifing the use of relaycache

* Standarzing name

* simplify

* Fix the potential risk to get null CurrentHeaderHash from Blockchain (#1033)

* Unit Test for Wallets Module (#1018)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* update IO module test

* delete empty line

* changename

* delete empty line

* revert commit

* add wallet test

* update testUtil

* delete empty line

* Update UT_NEP6Wallet.cs

* update ut

* Optimize wallet test

* fix

* add change

* fix nep6wallet

* Fix

* Optimize

* fix optimize

* fix

* Optimize

* Revert Console.WriteLine (#986)

* Set max block size (#953)

* Draft

* Take into account p2p max payload

* Move max allowed to policy

* Check block size on prepResponse

* Change reason

* Prevent overflow

* Optimization

* Reduce the length of the array

* Organizing consensus code

* Revert "Organizing consensus code"

This reverts commit 94a29dc.

* Remove Policy UT

* Resolve Policy conflicts

* prepare unit test

* Small unit test

* More ut

* Add one check

* Clean using

* Organizing consensus and comments

* Split unit test

* UT check block size

* Clean

* Expected witness size

* optimize

* Remove fakeWitness

* Format comments

* rename var

* Add (..)

* Remove SetKey method

* Centralize expected block size

* Optimize

* Fix

* Add one test

* Optimize `EnsureMaxBlockSize()`

* Fix unit tests

* Rename

* Indent

* Vitor suggestion

* Merge with Scoped signatures

* Remove extra line

* Revert "Remove extra line"

This reverts commit e134881.

* Remove extra line

* GitHub Contribution Guide  (#1028)

Adding GitHub Contribution Guide

* Optimize `GetHeader()` and `GetBlock()` (#1039)

* Update policy - Add maximum witness size (in bytes) (#1020)

* Max witness size

* Add error test

* Rename class

* allow 10/10

* rounding up to 1024 bytes

* Error with 11

* Fix ut

* Update VM to last changes (#1048)

* Update VM to last changes

* Remove hashes

* dotnet format (#1054)

* dotnet format

* fix CRLF

* Fix consensus problem for proposed blocks with zero transactions (#1053)

* Fix consensus (CRLF)

* Removing unnecessary lines changes - Cleaning PR

* Reverting all changes on CC

* Modifying ConsensusContext with proposed changes

* Small OnPersist optimization (#1058)

* Small update

* Cache native persist script

* fix crlf on neo.UnitTests and set all files to not use BOM (byte order mark) (#1057)

* Check dotnet format in travis

* Try to find the path

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Format travis

* test and source

* test and source

* Move to before the script

* testing if CRLF format is respected

* fix crlf on unit tests

* testing for crlf on unit tests too

* all utf-8

* neo/ on utf8 too

* looks like sudo is needed by travis

* download dos2unix 7.4.0

* temporaly remove | test

* back to | test

* explicit test zero

* no bom

* more non-boom to boom

* ensuring no_bom at all files

* Printing files with bom prefix

* Check both folders in one command

* Add verbosity

* Create .editorconfig

* Ensure the path of .editorconfig file

* Update .editorconfig

* Update .editorconfig

* Update .editorconfig

* use only dotnet-format

Is confirmed that .editorconfig works, so we should configure only this file

* basic formatting (just 5 files affected)

* dotnet version

* new lines on end

* update travis

* advice on auto crlf

* Update .travis.yml

* Update .travis.yml

* enforcing lf

* Fix dotnet format version

* removed dos2unix

* Exposing supported methods used by InteropService (#1060)

* Supported methods names

* dotnet format

* Simplify

* Remove lines of code (#1062)

It's not working

* Cleaning .editorconfig file (#1067)

* Hide the prefix in the store (#1070)

* Fixes `Transaction.ToJson()` (#1071)

* Fixes `Transaction.ToJson()`

* Fix tests

* Optimize mempool message (#1068)

* Optimization

* Prevent relay

* Change comment

* Optimizations

* Fix Runtime_GetNotifications (#1073)

* empty scripthash, all notifications (#1074)

* empty scripthash, all notifications

* || to &&

* Fix ut

* Issues templates for Bug report and Feature Request (#1034)

* Update NuGets (#1080)

* Update NuGets

* Clean BOM

* Update Neo.VM

* Downgrade Sqlite to 2.1.4 (#1086)

* Fix consensus (#1083)

* v3.0.0-preview1

* C# SDK Add Transaction Manager and Smart Contract APIs (#1026)

* Add NEO SDK based on RPC client

* add rpc interface methods for neo3

* update unit test

* add unit test

* Update TransactionHelper.cs

Changed for neo 3.0, not final yet.

* implement sdk rpc client methods

* backup files

* change class name

* remove uncompleted modules for pull request

* change json deserialize method with Neo JObject

* modified JSON implementation, added FromJson()

* more RPC change

* PR correction

* RPC module fix, remove newton.json

* fix

* fix getblock issue

* PR correction

* PR Correction

* PR Correction: rename RPC models

* PR Correction

* resolve conflicts

* Clean code

* Clean code

* Clean code

* Clean code

* Update RpcValidateAddressResult.cs

* Clean code

* PR correction

* Move test file to the right place

* Added SDK Transaction module.

* Add SDK SmartContract module

* height = count - 1

* Add sign function for TxManager

* Add Deploy Contract

* Add unit tests

* Add Network Fee calculate for TxManager,
add unit tests

* adjust cosigners change

* PR Correction

* Remove empty line

* Rename TxManager to TransactionManager

* PR correction

* PR correction

* change namespace

* Reorder methods

* Remove TransactionContext

* fix unit test

* Remove `virtual`

* Remove virtuals

* Remove ScriptHash from KeyPair

* Add comments

* Add comments

* Adjust to Neo_Contract_Create parameter

* use default mainfest

* fix unit test

* Fix typo

* use manifest as parameter

* add cosigner for nep5 transfer

* code clean

* Update neo.UnitTests/Network/RPC/UT_RpcClient.cs

Co-Authored-By: Shargon <shargon@gmail.com>

* move MakeScript to VM.Helper

* Add unit test for InteropInterface

* PR Correction

* Add unit test

* Template fix (#1107)

* Fixing template

* Fix

* Unit test For Legder module (#1038)

* update test ledger

* format

* Add enter between classes

* fix ut suggestion

* Update UT_PoolItem.cs

* Update UT_MemoryPool.cs

* Reduce usings

* Reduce changes

* More details on TestReVerifyTopUnverifiedTransactionsIfNeeded and fixed comment on ReVerifyTopUnverifiedTransactionsIfNeeded

* Minor fix on generic transaction generation fee

* Applying dotnet format

* Enhance functions in TestDataCache

* dotnet format

* Cast refactor

* comment tx3 for mempool

* Removing TODO comment

* Fix tx reverify (#1116)

* add internal to DB and WriteBatch

* tx.reverify add hashes.length != witnesses.length condition

* reset db.cs writebatch.cs

* format

* Add `vmState` field in rpc getrawtransaction result (#1117)

* add internal to DB and WriteBatch

* add vmstate field in rpc getrawtransaction result

* reset db.cs writebatch.cs

* Optimize

* Update RpcServer.cs

* Format

* Update RpcServer.cs

* Update RpcTransaction.cs

* Update UT_RpcClient.cs

* Fixes `RpcTransaction.VMState`

* Speed up travis (#1136)

* Speed up

* Update UT_NEP6Wallet.cs

* Speed ut

* More speed up

* Format

* Remove blank line

* Reduce travis verbosity

* Coverage only on linux

* CollectCoverage only if is needed

* Update .travis.yml

* Already build

* no-restore

* Update .travis.yml

* Back verbosity

* Update netcore version

* Remove BOM

* Update nugets

* Fix fluent update

* Paralellize

* format

* Update .travis.yml

* Fix

* Update .travis.yml

* Min verbose

* Remove parallel execution

* Fix change

* Revert AsParallel()

* Simplify and improve consensus payload serialization and deserialization (#1149)

* Simplify and improve consensus payload serialiation

* Simplyfing read

* Function return instead of out parameter

* Reorganize

* Update UT_IOHelper.cs

* Improve the random security (#1145)

* Remove global randoms

* Wallet

* Optimize

* Use random class

* Revert wallet

* Simplifying access to Transactions and Blocks in syscalls (#1081)

* Add Transaction.Sender and Transaction.Script

* Allow to get the current Transaction

* Update unit test, refactor transactions methods

* UT

* Summary TX object inside VM

* Revert some changes

* Refactor to new model and UT

* Fix

* Reduce conditional

* Fix ut

* Fix ut

* Change order

* Block

* Some fixes

* Fix comment

* Fix comments

* Move hash to the top

* Remove GetHeader

* Remove GetHeader

* Block with transactions count

* Migrate ContractState

* Format

* Close #1096

Close #1096

* Update nulls

* Remove Neo.Account.IsStandard

* Revert last change

* Fix Unit tests

* Remove unused var

* TrimmedBlock

* Change fee

* Neo.VM v3.0.0-CI00041

* Neo.VM v3.0.0-CI00042

* Rename

* ContractNullParameter

* Clean using

* Revert Null in ContractParameterType

* Fix two ToLower calls (#1155)

* Notification limits (#1100)

* Fix GetTransactionFromBlock Syscall (#1170)

* Fix Syscall

* Fix

* Unit Test for Smartcontract Module (#1090)

* submit ut

* fix

* Enhance functions in TestDataCache

* git amend blockchain

* fix test related to TestDataCache

* dotnet format

* dotnet format

* add blank line

* fix test

* Optimize random

* Optimize Random

* fix test

* add decimal test

* fix

* 2019/9/25 16:54

change format

* Fixes events

* update assertion sentence

* update UT following code change

* format

* add type check

* recommit

* recommit

* Ensure txs are cleared before Blockchain actor (#1166)

* Unit Test For RPC Module (#1111)

* fix payload limits (#1194)

* Fix JsonSerializer (#1197)

* Fix #1128 (#1129)

* Fix #1128

* Update BlockBase.cs

* Add shutdown event for plugins (#1195)

* add shutdown event for plugins

* use IDisposable

* dispose plugins first

* Removing brackets

* Replace function exceptwith and unionwith with faster functions  (#1174)

* Replace ExceptWith & UnionWith with equal but faster functionality

* Optimization

* Optimization

* Optimize remove

* Update neo/Network/P2P/TaskManager.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Code optimization

* Update Helper.cs

* Small change

* Optimization

* Update Helper.cs

* Revert

* Optimization

* Optimize FIFOSet

* Rename

* Inline

* Update UT_FIFOSet.cs

* Fix

* Update UT_FIFOSet.cs

* Update FIFOSet.cs

* Update FIFOSet.cs

* Revert FIFOSet

* Update Helper.cs

* Optimize

* Reverting independet byte checks to SequenceEqual

* Unit tests for some auxiliary classes (#1192)

* Fix p2p filter unconnected peers (#1160)

* Remove the case of GetData in ProtocolHandlerMailbox#ShallDrop (#1201)

* Add GetFullBlocks P2P logic (enable fixing #522) (#1138)

* add GetFullBlocks P2P logic

* add missing new line

* allow request genesis block

* Optimization

* Update MessageCommand.cs

* - rename command
- fix protocol handler cast
- fix payload deserialization for default value

* change to ushort per review

* remove default count, rename class

* typo + failed refactor coverage ¯\_(ツ)_/¯

* Use base64 in JsonSerializer (#1199)

* Base64 Json

* No format

* Json Transaction optimization

* Change to Base64

* Revert some changes

* Revert

* Remove Helper.Base64

* Remove Base64FormattingOptions.None

* Optimize MerkleTree (3x) (#1203)

* Optimize MerkleTree

* Update MerkleTree.cs

* Update MerkleTree.cs

* Added more verbosity to CN logs (#1202)

* Add reason log for cn

* Update ConsensusService.cs

* Keep track of sender fee (#1183)

* Keep track of sender fee to avoid duplicate computation

* Code optimization

* Optimize

* Optimize

* Optimize

* Code optimization

* Correction

* Renaming currentFee to totalSenderFeeFromPool

* Renaming on Verify as well

* Add consideration for null Transactions

* Move sender fee recording systems to class SendersMonitor

* Code optimization

* Capitalize public items

* Code optimization

* Code optimization

* Optimization

* Code optimization

* Using problem description (#1214)

Using problem description helps problem grouping (people may propose different solutions for the same problem)

* Improve SYSCALLs: `Neo.Crypto.*` (#1190)

* Prevent XXE (3x) (#1229)

* Remove unnecessary logic from Mempool (#1216)

* Prevent remove storage flag when there are something stored (#1227)

* Add NeoAPI and update code after testing with NEO3 preview1 (#1150)

* Adding neo version to feature suggestion (#1240)

* Fix Base58 issues (3x) (#1224)

* Fix base58

* Optimize

* Update Base58.cs

* Revert some lines

* Rename

* Update Base58.cs

* Decrease the block time threshold (3x) (#1233)

* Fix 1244 Mempool.ReverifyTransactions (#1248)

* add internal to DB and WriteBatch

* reset db.cs writebatch.cs

* fix Nep5Token.Burn method

* format

* format

* reset and fix memorypool.ReverifyTransactions

* reset and fix ReverifyTransactions

* add ut

* remove commit

* fix BlockPersistAndReverificationWillAbandonTxAsBalanceTransfered.balance

* update comments

* Improve p2p message deserialization (#1262)

* Ensure that the block is valid before relay it on CheckCommits (#1220)

* Upgrade dependencies and target frameworks (#1178)

* Upgrade dependencies and target frameworks

* Update neo.csproj

* Remove BOM

* Restore net47 and Neo.VM v3.0.0-CI00042

* Remove net47

* Microsoft.EntityFrameworkCore.Sqlite v3.0.0

* Fix some of the tests

* Revert "Microsoft.EntityFrameworkCore.Sqlite v3.0.0"

This reverts commit b1c9d09.

* Neo.VM v3.0.0-CI00046

* Remove before_script

* FormatException

* Fixes

* Fixes

* Fix

* Update neo.csproj

* Neo.VM v3.0.0-CI00051

* Upgrade dependencies

* Disable warnings

* Upgrade UT dependencies

* Update neo.csproj

* Neo.VM v3.0.0-CI00170

* Move projects into folders (#1269)

* Remove Travis and use Github Actions (#1267)

* Optimize BigInteger (#1280)

* apply strict enum checking (#1254)

* Small optimizations using cached VM Script (#1215)

* Storage abstract (#1249)

* Allow to iterate a byte array inside the smart contract (#1281)

* Update changes

* Fix UT

* Rename

* Update ByteArrayWrapper.cs

* Support Neo.Iterator.Create

* Add ut and Rename

* Cover line

* Revert rename

* New plugin interface: IStoragePlugin (#1087)

* Optimize TaskManager (#1294)

* Cache `Transaction.Size` (#1282)

* Improving ConsensusService UT: Adding some coverage to OnPersistCompleted, OnPrepReq, OnPrepResponse, OnCommit and some auxiliary methods (#1169)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding Recovery and OnTimer coverage on CN UT

* Fixing files that should not be modified

* Fixing files that should not be modified II

* Greatly improving UT!

* Dotnet format

* Changing to 200ms

* More messages and casting asserts

* Forcing prepReq to 0 hashes because mempool is shared

* UT reaching Commit!

* Trying to check Commit for achieving a blockRelay. However, signatures need to match

* Trying to mock ECPoints. However, errors when GetWitness of Block after adding signatures

* Relaying block! Passing with sucess

* A little bit more coverage and ensure Block Relay event from LocalNode

* Cleaning thread

* Fixing duplicated index of preparation replication and other minor fix

* Returning prevHeader and block to original

* Retuning merkle root of block to original value

* dotnet format!

* Forcing an old timestamp for avoiding OnTimer

* Assert RecoveryMessage because of commitsent

* Improving variable and function names

* Cleaning and improving comments

* Updating blocktime

* Fixing nextconsensus expected hash due to some recent PR

* Capeslock on methods

* Trying to fix UT Consensus

* Increasing coverage for OnPersistCompleted

* Many workarounds but it is working again!

* dotnet format

* Cleaning UTs I

* Cleaninng UTs II

* Minor typo on variable

* Improving comments

* Adding some summary to methods

* Adding clone to the comment

* Adding variable to timestamp

* Removing other timestamps

* Remove Linq from ECDSA and UInt classes (#1283)

* Unify the BigInteger serialization standard with NeoVM (#1307)

* Optimizations for .NET Standard 2.1

* Change address version (#1299)

* Simple Way to Parallel Verification Transaction (#1298)

* Fix/Improve syncing (3x): Adding ping mechanism to TaskManager for replacing StartHeight and PendingKnownHashes strategy (#899)

* Remove leveldb

* Fix `InvPayload.CreateGroup()` (#1314)

* Add Blockchain UT for parallel TX (#1310)

* Allow users to more easily select MemoryStore. (#1311)

* Remove meaningless UT (#1317)

* Improve plugins (#1312)

* Fix typo (#1319)

* Neo.VM v3.0.0-CI00174 (#1320)

* Fix ToParameter() (#1323)

* Optimize ContractManifest.Clone() (#1328)

* Dispose ApplicationEngine after using (#1336)

* Update NeoVM nuget (#1331)

* Update dotnetcore.yml

* Improving UT consensus with new asserts, additional coverage for Recoveries (#1318)

* Improving UT consensus with new asserts

* Additional subscriber waits before Preparations

* Using @shargon tip for snapshot and increasing recovery coverage

* Trying to reload commits on Recovery. ping @shargon

* Cleaning and fixing wrong multisig being used to sign payload

* Checking the promising simple way

* Simplifing CreateStorageKey

* Fixing error on key and now engine is HALT

* Fixing commit Asert after Recovery!

* Minor typo fix on asserts

* Create function for creating StorageKey for Neo Native

* Trying to return Snapshot to original state

* Some tricks for modifying committed snaphost

* Cleaning

* Fixing Assert before subscriber wait

* Cleaning and leaving last check comment in case we need

* Simplifying mocking of nextvalidators

* Cleaning SignPayload

* Uncommenting code. Ensuring nondeterministic behavior after last recover

* Remove RPC (#1340)

* Remove some dependencies

* Update and rename dotnetcore.yml to main.yml

* Readme update (#1341)

* text update

* Remaining images

* Using tables, moving status

* Neo modules

* Fixing typo

* Fixing typo 2

* Fixing URL

* Using same name on titles

* Improve JSON (#1315)

* Adding some comments to P2P classes (#1212)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding some comments to Peers class

* Reverting change on ProtocolHandler

* dotnet format

* Additional comments

* Adding extra comments

* Fixing typo

* Fixing typo

* Fixing typo

* Adding more comments

* adding more comments

* Add some comments of P2P (#1303)

* add some comments of P2P

* fix

* Minor changes

* Minor changes

* Minor Changes

* Minor changes

* Minor changes

* dotnet format

* Minor changes

* Minor changes

* Additional comments

* Minor changes

* Reverting variable change

* Dotnet format

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* More optimizations about Span (#1352)

* Restrict the serialization (#1353)

* Adding contact information to manifest (#1246)

* Adding neo 2 metadata

* Double check

* Adding website and description

* Solution tests

* Dotnet format

* Using generic extra object

* Fix clone

* Removing manifest to test push

* Removing wrong file, renaming test

* Revert "Removing manifest to test push"

This reverts commit 4f57da4.

* Update src/neo/SmartContract/Manifest/ContractManifest.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Update src/neo/SmartContract/Manifest/ContractManifest.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Fixing tests

* JObject clone

* Dotnet format

* Null check

* Removing unecessary instantiation of primitive types

* Removing refenrece check, returning this

* Prevent Timer's lock with wrong dns (#1358)

* Prevent to lock Timer with wrong dns

* Parse dns en ProtocolSettings

* Update LocalNode.cs

* Update LocalNode.cs

* Update ProtocolSettings.cs

* Fix ut

* Update ProtocolSettings.cs

* Update UT_ProtocolSettings.cs

* dotnet format

* Process dns seeds in parallel

* Revert UT

* Revert protocol settings

* Update UT_ProtocolSettings.cs

* Update ProtocolSettings.cs

* Add comment

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Neo.VM.3.0.0-CI00190 (#1357)

* Fix SeedList initialization (#1363)

* AssemblyResolve (#1349)

* Rename SYSCALLs (#1362)

* Change the way to get RemoteNode from ActorSelection to RemoteNodes Dictionary  (#1354)

* update connections.tell

* optimise

* update

* add comment

* CallEx implementation (#1364)

* Link fixes (#1351)

* Set the price of RET to 0 (#1379)

* add data size check (#1381)

* Set limits in MerkleBlockPayload (3x) (#1377)

* Set limits in MerkleBlockPayload (3x)

* Update MerkleBlockPayload.cs

* Update src/neo/Network/P2P/Payloads/MerkleBlockPayload.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Update MerkleBlockPayload.cs

Co-authored-by: Erik Zhang <erik@neo.org>

* Neo.VM.3.0.0-CI00201 (#1374)

* Add relay-block-filter (#1380)

* add relay-block-filter

* modify

* modify

* modify

* modify

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Adding some comments to datacache (#1347)

* Adding some comments to datacache

* Adding Exception comment tip of @Tommo-L

Co-authored-by: Shargon <shargon@gmail.com>

* Rename CalculateNetWorkFee() (#1401)

* Use HashsetCache instead of FIFOSet for KnownHashes and SentHashes (#1389)

* update

* change fifoset to hashsetcache for knownhashes and senthashes

* format

* optimise HashSetCache

* remove FIFOSet

* remove FIFOSet and update ut

* change List to LinkedList

* remove bucket count upper limit

* update exception message

* Adding some comments

* dotnet format

* rename maxBucketCount

* format

* Cache count

* Vitor suggestions

* Update HashSetCache.cs

* format

* Fix

* fix counting count

* optimise

* optimse

* update List

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Add ContainsTransaction Recheck when ParallelVerifiedTransaction Received (#1408)

* add containsTx recheck

* add UT

* Update to just View check

* update

* revert

* Update UT_Blockchain.cs

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Enhance security (1) (#1403)

* inputs validation

* more validation

* recover constructor in ECPoint

* format

* minor changes

* format

* changes based on review

* recover validation in AesEncrypt

* Fix undefined layout behaviour, and remove pinning: Uint256 and Uint160 (#1387)

* Fix undefined layout behaviour, and remove pinning

* Update UInt256.cs

* Update UInt256.cs

* add StructLayout

* set pack=1

* Explicit

* Remove UIntBase

* Revert constructor

* add unsafe

* Comment

* Comment Uint256

* Removing comments from value 1

* Removing comments from value1

Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Allow to verify import blocks (#1415)

* Verify Import

* Default true

* Fix notifications (#1422)

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Add ID to ContractState (#1400)

* Fix dotnet-format (#1443)

* Add Salt and NEP2 to db3 wallet (#1444)

* NEP2

* Clean code

* Use MasterKey as passphrase

* Add Salt

* Unique Scrypt for all wallets

* Clean using

* Clean parameters

* Fix UT

* Random Salt

* fix ToStackItem issue (#1427)

* Allow MultiSig contracts in Wallet.Sign method (#1451)

* Allow to sign multisignature account if you have some of them

* Update IsMultiSigContract()

* Fixes UT

* Check null

* Update Wallet.cs

* Change if

Co-authored-by: Erik Zhang <erik@neo.org>

* update neo-vm version (#1456)

* Remove parallel verification (#1429)

* cast M to double (#1465)

* Read Fixed (#1454)

* Read Fixed

* format

* Rename

* Fix Consensus UT

* Add ut, and allow buffered streams

* Add ut, and allow buffered streams

* Change name

* Update Helper.cs

Co-authored-by: erikzhang <erik@neo.org>

* Adjust the Charge for Storage Writting (#1441)

* fix BigInteger0 storage outputs null  (#1471)

* Fix bug in contract update/destory (#1483)

* first commit

* format

* commit again

* format

* Burn sys_fee (#1430)

* Replace THROWIFNOT by ASSERT (#1475)

* Fix change password (#1490)

* Optimize the wallet UT (#1496)

* Limit the max height for some SYSCALLs (#1494)

* Send RelayResult to event stream (#1495)

* Add GasLeft syscall (#1509)

* Update akka to 1.4.2 (#1466)

* Optimize wallet tests (#1499)

* Optimize the wallet UT

* Optimize wallet UT test

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>

* rename bytearray to bytestring (#1524)

* rename bytearray to bytestring

* update dependency

* Support changing password for nep6 wallet (#1504)

* Remove UT_Culture (#1529)

* Optimize the wallet UT

* Optimize wallet UT test

* Test 2 culture

* Code optimization

* Delete UT_Culture

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>

* remove round up sysfee (#1522)

* Enable converting between public keys, script hashes and address (#1428)

* Enable converting between public keys, script hashes and address

* Add test cases

* Code optimization

* Fee adjusting

* Code optimization

* Add comment

* Code optimization

* Code optimization

* Merge from master

* Update InteropService.Contract.cs

* Code optimization

* Add wrong public key test cases

* Kick off new test

* format changing

* Code optimization

* Add comment

Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Fix SYSCALLs (#1511)

* Combine RemoteNode and ProtocolHandler (#1520)

* Fix akka warning (#1533)

* Tell RelayResult to the sender (#1548)

* Add abstract method Wallet.ChangePassword() (#1552)

* Network dependant signature (#1550)

* 3.0.0-preview2

* Vote for committee (#1491)

* Fix version

* Modify manifest according to the last amendment of NEP-3 (#1481)

* Sync try-catch opcodes (#1565)

* Fix plugin configuration falure (#1564)

* Add StackItem.ToJson() (#1569)

* Call _initialize() automatically (#1572)

* Remove grouping (#1566)

* Add GetCallFlags (#1587)

* Fix CallFlags (#1589)

* Simplify access to storage for native contracts. (#1583)

* Cache most recent block (#1592)

* Add StateLess to CallFlags (#1549)

* Add standard cryptography primitives (#1419)

* Datacache correction (#1611)

* Fix LocalNode (#1616)

* Remove ProtocolSettings Initialize

* Revert "Remove ProtocolSettings Initialize"

This reverts commit 58dda0b.

* Avoid calling ProtocolSettings.Default in multiple threads

Co-authored-by: Jin Qiao <jinqiao@neo.org>

* Update neo-vm package (#1624)

* Update neo.csproj

* Update all nugets

* Unify akka logs with neo logs (#1623)

* Unify akka logs

* Add event

* dotnet format

* Remove event

* Remove overload

* Clean changes

* Fix compilation error

* Simplify Logger

Co-authored-by: erikzhang <erik@neo.org>

* Remove FromJson (#1625)

* Unify unhandled exceptions (#1626)

* Core handle errors

* Unify UnhandledExceptions

* Remove empty line

* Move to NeoSystem

* Update NeoSystem.cs

* Allow log objects

* Change the source of UnhandledException

Co-authored-by: Erik Zhang <erik@neo.org>

* Make NEP6Wallet.path public (#1627)

* wallet-backup

* make path public

* case

* Abstract Path

* Improve

* Revert UT

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Add a change list to optimize datacache commit (#1619)

* Move cosigners to transaction attributes (#1620)

* First draft

* Remove dictonary

* Move json methods

* format

* Fix UT

* Fix Size

* clean code

* Fix UT

* Clean code

* Remove const

* Remove blank line

* Pluralize

* Allow multiple attributes of the same type

* Update src/neo/Wallets/Wallet.cs

* Fix some UT

* Fix UT

* Fix UT

* Update src/neo/Network/P2P/Payloads/CosignerAttribute.cs

Co-authored-by: Erik Zhang <erik@neo.org>

* Singular

* Move Cosigner to TransactionCollection

* Optimize empty

* Use ReflectionCache

* Change json format

* Rename

* Remove FromJson

* Optimize TransactionAttribute.ToJson()

* Rename

* Refactor

* Change the value of TransactionAttributeType.Cosigner

* Fix UTs

* Fix attribute order

* Remove TransactionAttributeCollection

* Reorder

* Revert some changes

* Revert some changes

Co-authored-by: Erik Zhang <erik@neo.org>

* Fix VerifyWitness (#1628)

* Modify iterators to public (#1639)

* modify iterators

* fix

* fix

* fix

* Revert "Improve gap calculation"

This reverts commit 9fa04a4.

* Revert "Revert "Improve gap calculation""

This reverts commit e920732.

* Use config from current working dir (#1622)

* Use config from current dir

* Search in multiple places

* Make Plugin.Path be virtual

* Not found command (#1645)

* Not found command

* Remove unused method

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Subscribe to RelayResult messages in ConsensusService (#1647)

* Create only one snapshot for persist (#1602)

* Remove OnPersistCompleted()

* Optimize Blockchain.cs

* Move namespace

* Decouple NativeContract from InteropService. (#1649)

* Optimize the `GetPrice()` mechanism of SYSCALLs (#1650)

* fix the way to get the directory path of assembly (#1656)

* Ask for mempool after sync (#1544)

* Query mempool if I have less tx than the remote node

* Revert some changes

* Wait for verack

* Clean file

* Move to verack

* Wait for block sync

* Clean changes

* Only accept one mempool message per remote node

* Remove one variable

* Revert "Only accept one mempool message per remote node"

This reverts commit 359a3bb.

* Optimize

* Check it in TaskManager

* Update src/neo/Network/P2P/TaskSession.cs

Co-authored-by: Luchuan <luchuan@neo.org>

* Revert

* fix MemPoolTaskHash (#1660)

* Fix ms bug

* private

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: Erik Zhang <erik@neo.org>

* Remove CommitteeMembersCount and ValidatorsCount from Blockchain.cs

* Fix policy check (#1668)

* fix policy check

* Rename

* Fix GetCommitteeAddress()

Co-authored-by: erikzhang <erik@neo.org>

* Inventory message stream optimization (#1667)

* Rename

* Refactor InteropService (#1655)

* Optimize TransactionAttribute (#1674)

* Add MPT (#1442)

* Fix DataCache.Find (#1673)

* GetBlocks by block index (#1397)

* add description field (#1678)

* Fix duplicate connection (#1685)

* fix duplicate connection

* fix comments

* Rename to AllowNewConnection

* fix

* Fix comment

* fix

* Rename

* Remove useless check

* Update

* Update LocalNode.cs

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Check the parameters count (#1695)

* Add RIPMED60 to syscall in ApplicationEngine.Crypto (#1694)

* Add Hash160 and Hash256 to syscall

* remove unnecessary reference

* format fix

* provide RIPMED160 instead of Hash256 and Hash160
Add RIPMED160 UT

Co-authored-by: Erik Zhang <erik@neo.org>

* Refactor NativeContract (#1693)

* Close #1696

* Add MaxBlockSystemFee (#1689)

* add max block system fee

* fix tx

* fix and add more ut

* format

* optimze code

* Reset maxblocksystem = 9000/GAS

* Update src/neo/SmartContract/Native/PolicyContract.cs

Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>

* Remove new line in log

* Update ConsensusService.cs

* up Prefix_MaxBlockSize as skiptable.insert

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>

* Add event name to System.Runtime.Notify() (#1701)

* Check return value of contracts (#1680)

* Check Json.Serialize map keys (#1705)

* Always return a value for public methods (#1706)

* Update to Neo.VM.3.0.0-CI00226 (#1713)

* Create callback (#1629)

* Merge

* Invoke callback

* dotnet-format

* Change UT for two args

* callbacks

* Syscall callback UT

* rename

* Rename

* Clean

* Clean again :P

* Rename

* Fix CurrentContext scope

* Rename

* abstract class

* Erik's feedback

* change ut

* fix ut

* Move to new namespace

* Move callback logic to ApplicationEngine

* Add TODO

* We don't need to check the CallFlags

* Remove RaiseLoadContext() and RaiseOnSysCall()

* Fix UT

* Add MethodCallback

* Update neo.csproj

* Fix compile

* Don't need to check the return value any more.

* Add AllowCallback to InteropDescriptor

* Modify the prices

* Fix

Co-authored-by: erikzhang <erik@neo.org>

* Add StrictUTF8 (#1710)

* Restrict notifications (#1708)

* fix storage fee

* fix

* Optimize

* Fix

* Real Fi

* apply

* Correct the formula

* fix ut

Co-authored-by: Igor Machado Coelho <igor.machado@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: zhangtao <ztgoforit@163.com>
Co-authored-by: Charis Zhao <eryeer@163.com>
Co-authored-by: belane <belane@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Yongjie Ma <20391402+yongjiema@users.noreply.github.com>
Co-authored-by: Ricardo Prado <38396062+lock9@users.noreply.github.com>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>
Co-authored-by: Erik van den Brink <git@erikvandenbrink.com>
Co-authored-by: Qiao-Jin <43407364+Qiao-Jin@users.noreply.github.com>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: doubiliu <liumengyu@neo.org>
Co-authored-by: ShawnYun <42930111+ShawnYun@users.noreply.github.com>
Co-authored-by: joeqian <qianzhuo@ngd.neo.org>
Co-authored-by: cn1010 <1062108372@qq.com>
Co-authored-by: John <johnkellyoxford@gmail.com>
Co-authored-by: doubiliu <liumengyu@ngd.neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: cn1010 <baoting@onchain.com>
Co-authored-by: lichen <48947753+Lichen9618@users.noreply.github.com>
Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>
ShawnYun added a commit to ShawnYun/neo that referenced this pull request Jan 8, 2021
* dotnet format (neo-project#983)

* Fixes `NeoToken.CalculateBonus()` (neo-project#992)

* Small cache changes (neo-project#994)

* Cache changes

* Update UT_Cache.cs

* Fixes `GetRegisteredValidators()` (neo-project#991)

* Fix/travis parallel jobs (neo-project#987)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* split travis jobs

* add -v n

* Fixes neo-project#999

* Add and update some Unit tests in IO module (neo-project#998)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* update IO module test

* delete empty line

* changename

* delete empty line

* revert commit

* Fix (neo-project#1008)

* Fix for 1005 (neo-project#1006)

* Fix null values during ChangeViewReason (neo-project#1016)

* Avoid processing own hashes (3x) (neo-project#1009)

* Avoid processing own hashes

* Shargon's suggestion I

* Shargon's suggestion II

* rename

* Scoped signatures (neo-project#968)

* Base

* Check Witness

* Fix some unit tests

* More ut fixes

* Clean code

* Fix more unit tests

* Fake witness for make transfer

* Fix ut

* Simplifying if

* rename to RootAccess

* adding scope type, preparing for cosigners

* reading scope from stream

* attaching CosignerUsage

* calculate scope size

* Finish cosigner usage

* Global constant

* Clean

* AsSerializable @erikzhang

* avoiding empty scope data serialization

* fix logic

* moved scopes to Transaction

* fixed tests

* Change CheckWitness

* Follow the standard

* rename var

* Remove FakeWitness

* Fix cosigner ussage

* Clean

* Fix CosignerUsage

* fix RootAccess

* removed not null

* fixed malformed tx generation

* no need for attribute on all test tx

* testing sizes

* renamed RootAccess to EntryOnly, and explained enum compositions

* discovering which size is wrong

* Remove spaces

* doubts on scope sign test

* removing scopes everywhere

* wrong tx size

* fixed tests

* remove print

* more scope tests

* reorder

* revert changes on Witness

* Modify CheckWitness

* Reduce changes

* Fix Cosigner usage

* Combine CosignerUsage

* Indent

* filtering groups by pubkey

* Organize

* Rename ScriptHash to Account

* renamed EntryOnly to CalledByEntry

* dotnet format

* fix file UT_CosignerUsage

* tests for double cosigners

* assert catch exceptions

* clean and format

* improvements

* Format ut exceptions

* Rename ut

* Remove changes

* Follow comment standard

* Rename to Cosigner

* Move cosigners outside

* Clean comments

* Reorder the parameters

* Fix unit tests

* limit max cosigners by 16 (same as attributes)

* testing non-distinct cosigners

* respect max cosigners

* MaxSubitems

* test CalledByEntry together with GAS

* Update comment

* Clean comments

* Global=0

* Fix ut

* broken test for combination Global | NEO

* back to global 0x80

* global back to 0x00, as default

* Update comment

* Improving the use of `RelayCache` on `ProtocolHandler` (neo-project#1014)

* Refactoring and simplifing the use of relaycache

* Standarzing name

* simplify

* Fix the potential risk to get null CurrentHeaderHash from Blockchain (neo-project#1033)

* Unit Test for Wallets Module (neo-project#1018)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* update IO module test

* delete empty line

* changename

* delete empty line

* revert commit

* add wallet test

* update testUtil

* delete empty line

* Update UT_NEP6Wallet.cs

* update ut

* Optimize wallet test

* fix

* add change

* fix nep6wallet

* Fix

* Optimize

* fix optimize

* fix

* Optimize

* Revert Console.WriteLine (neo-project#986)

* Set max block size (neo-project#953)

* Draft

* Take into account p2p max payload

* Move max allowed to policy

* Check block size on prepResponse

* Change reason

* Prevent overflow

* Optimization

* Reduce the length of the array

* Organizing consensus code

* Revert "Organizing consensus code"

This reverts commit 94a29dc.

* Remove Policy UT

* Resolve Policy conflicts

* prepare unit test

* Small unit test

* More ut

* Add one check

* Clean using

* Organizing consensus and comments

* Split unit test

* UT check block size

* Clean

* Expected witness size

* optimize

* Remove fakeWitness

* Format comments

* rename var

* Add (..)

* Remove SetKey method

* Centralize expected block size

* Optimize

* Fix

* Add one test

* Optimize `EnsureMaxBlockSize()`

* Fix unit tests

* Rename

* Indent

* Vitor suggestion

* Merge with Scoped signatures

* Remove extra line

* Revert "Remove extra line"

This reverts commit e134881.

* Remove extra line

* GitHub Contribution Guide  (neo-project#1028)

Adding GitHub Contribution Guide

* Optimize `GetHeader()` and `GetBlock()` (neo-project#1039)

* Update policy - Add maximum witness size (in bytes) (neo-project#1020)

* Max witness size

* Add error test

* Rename class

* allow 10/10

* rounding up to 1024 bytes

* Error with 11

* Fix ut

* Update VM to last changes (neo-project#1048)

* Update VM to last changes

* Remove hashes

* dotnet format (neo-project#1054)

* dotnet format

* fix CRLF

* Fix consensus problem for proposed blocks with zero transactions (neo-project#1053)

* Fix consensus (CRLF)

* Removing unnecessary lines changes - Cleaning PR

* Reverting all changes on CC

* Modifying ConsensusContext with proposed changes

* Small OnPersist optimization (neo-project#1058)

* Small update

* Cache native persist script

* fix crlf on neo.UnitTests and set all files to not use BOM (byte order mark) (neo-project#1057)

* Check dotnet format in travis

* Try to find the path

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Format travis

* test and source

* test and source

* Move to before the script

* testing if CRLF format is respected

* fix crlf on unit tests

* testing for crlf on unit tests too

* all utf-8

* neo/ on utf8 too

* looks like sudo is needed by travis

* download dos2unix 7.4.0

* temporaly remove | test

* back to | test

* explicit test zero

* no bom

* more non-boom to boom

* ensuring no_bom at all files

* Printing files with bom prefix

* Check both folders in one command

* Add verbosity

* Create .editorconfig

* Ensure the path of .editorconfig file

* Update .editorconfig

* Update .editorconfig

* Update .editorconfig

* use only dotnet-format

Is confirmed that .editorconfig works, so we should configure only this file

* basic formatting (just 5 files affected)

* dotnet version

* new lines on end

* update travis

* advice on auto crlf

* Update .travis.yml

* Update .travis.yml

* enforcing lf

* Fix dotnet format version

* removed dos2unix

* Exposing supported methods used by InteropService (neo-project#1060)

* Supported methods names

* dotnet format

* Simplify

* Remove lines of code (neo-project#1062)

It's not working

* Cleaning .editorconfig file (neo-project#1067)

* Hide the prefix in the store (neo-project#1070)

* Fixes `Transaction.ToJson()` (neo-project#1071)

* Fixes `Transaction.ToJson()`

* Fix tests

* Optimize mempool message (neo-project#1068)

* Optimization

* Prevent relay

* Change comment

* Optimizations

* Fix Runtime_GetNotifications (neo-project#1073)

* empty scripthash, all notifications (neo-project#1074)

* empty scripthash, all notifications

* || to &&

* Fix ut

* Issues templates for Bug report and Feature Request (neo-project#1034)

* Update NuGets (neo-project#1080)

* Update NuGets

* Clean BOM

* Update Neo.VM

* Downgrade Sqlite to 2.1.4 (neo-project#1086)

* Fix consensus (neo-project#1083)

* v3.0.0-preview1

* C# SDK Add Transaction Manager and Smart Contract APIs (neo-project#1026)

* Add NEO SDK based on RPC client

* add rpc interface methods for neo3

* update unit test

* add unit test

* Update TransactionHelper.cs

Changed for neo 3.0, not final yet.

* implement sdk rpc client methods

* backup files

* change class name

* remove uncompleted modules for pull request

* change json deserialize method with Neo JObject

* modified JSON implementation, added FromJson()

* more RPC change

* PR correction

* RPC module fix, remove newton.json

* fix

* fix getblock issue

* PR correction

* PR Correction

* PR Correction: rename RPC models

* PR Correction

* resolve conflicts

* Clean code

* Clean code

* Clean code

* Clean code

* Update RpcValidateAddressResult.cs

* Clean code

* PR correction

* Move test file to the right place

* Added SDK Transaction module.

* Add SDK SmartContract module

* height = count - 1

* Add sign function for TxManager

* Add Deploy Contract

* Add unit tests

* Add Network Fee calculate for TxManager,
add unit tests

* adjust cosigners change

* PR Correction

* Remove empty line

* Rename TxManager to TransactionManager

* PR correction

* PR correction

* change namespace

* Reorder methods

* Remove TransactionContext

* fix unit test

* Remove `virtual`

* Remove virtuals

* Remove ScriptHash from KeyPair

* Add comments

* Add comments

* Adjust to Neo_Contract_Create parameter

* use default mainfest

* fix unit test

* Fix typo

* use manifest as parameter

* add cosigner for nep5 transfer

* code clean

* Update neo.UnitTests/Network/RPC/UT_RpcClient.cs

Co-Authored-By: Shargon <shargon@gmail.com>

* move MakeScript to VM.Helper

* Add unit test for InteropInterface

* PR Correction

* Add unit test

* Template fix (neo-project#1107)

* Fixing template

* Fix

* Unit test For Legder module (neo-project#1038)

* update test ledger

* format

* Add enter between classes

* fix ut suggestion

* Update UT_PoolItem.cs

* Update UT_MemoryPool.cs

* Reduce usings

* Reduce changes

* More details on TestReVerifyTopUnverifiedTransactionsIfNeeded and fixed comment on ReVerifyTopUnverifiedTransactionsIfNeeded

* Minor fix on generic transaction generation fee

* Applying dotnet format

* Enhance functions in TestDataCache

* dotnet format

* Cast refactor

* comment tx3 for mempool

* Removing TODO comment

* Fix tx reverify (neo-project#1116)

* add internal to DB and WriteBatch

* tx.reverify add hashes.length != witnesses.length condition

* reset db.cs writebatch.cs

* format

* Add `vmState` field in rpc getrawtransaction result (neo-project#1117)

* add internal to DB and WriteBatch

* add vmstate field in rpc getrawtransaction result

* reset db.cs writebatch.cs

* Optimize

* Update RpcServer.cs

* Format

* Update RpcServer.cs

* Update RpcTransaction.cs

* Update UT_RpcClient.cs

* Fixes `RpcTransaction.VMState`

* Speed up travis (neo-project#1136)

* Speed up

* Update UT_NEP6Wallet.cs

* Speed ut

* More speed up

* Format

* Remove blank line

* Reduce travis verbosity

* Coverage only on linux

* CollectCoverage only if is needed

* Update .travis.yml

* Already build

* no-restore

* Update .travis.yml

* Back verbosity

* Update netcore version

* Remove BOM

* Update nugets

* Fix fluent update

* Paralellize

* format

* Update .travis.yml

* Fix

* Update .travis.yml

* Min verbose

* Remove parallel execution

* Fix change

* Revert AsParallel()

* Simplify and improve consensus payload serialization and deserialization (neo-project#1149)

* Simplify and improve consensus payload serialiation

* Simplyfing read

* Function return instead of out parameter

* Reorganize

* Update UT_IOHelper.cs

* Improve the random security (neo-project#1145)

* Remove global randoms

* Wallet

* Optimize

* Use random class

* Revert wallet

* Simplifying access to Transactions and Blocks in syscalls (neo-project#1081)

* Add Transaction.Sender and Transaction.Script

* Allow to get the current Transaction

* Update unit test, refactor transactions methods

* UT

* Summary TX object inside VM

* Revert some changes

* Refactor to new model and UT

* Fix

* Reduce conditional

* Fix ut

* Fix ut

* Change order

* Block

* Some fixes

* Fix comment

* Fix comments

* Move hash to the top

* Remove GetHeader

* Remove GetHeader

* Block with transactions count

* Migrate ContractState

* Format

* Close neo-project#1096

Close neo-project#1096

* Update nulls

* Remove Neo.Account.IsStandard

* Revert last change

* Fix Unit tests

* Remove unused var

* TrimmedBlock

* Change fee

* Neo.VM v3.0.0-CI00041

* Neo.VM v3.0.0-CI00042

* Rename

* ContractNullParameter

* Clean using

* Revert Null in ContractParameterType

* Fix two ToLower calls (neo-project#1155)

* Notification limits (neo-project#1100)

* Fix GetTransactionFromBlock Syscall (neo-project#1170)

* Fix Syscall

* Fix

* Unit Test for Smartcontract Module (neo-project#1090)

* submit ut

* fix

* Enhance functions in TestDataCache

* git amend blockchain

* fix test related to TestDataCache

* dotnet format

* dotnet format

* add blank line

* fix test

* Optimize random

* Optimize Random

* fix test

* add decimal test

* fix

* 2019/9/25 16:54

change format

* Fixes events

* update assertion sentence

* update UT following code change

* format

* add type check

* recommit

* recommit

* Ensure txs are cleared before Blockchain actor (neo-project#1166)

* Unit Test For RPC Module (neo-project#1111)

* fix payload limits (neo-project#1194)

* Fix JsonSerializer (neo-project#1197)

* Fix neo-project#1128 (neo-project#1129)

* Fix neo-project#1128

* Update BlockBase.cs

* Add shutdown event for plugins (neo-project#1195)

* add shutdown event for plugins

* use IDisposable

* dispose plugins first

* Removing brackets

* Replace function exceptwith and unionwith with faster functions  (neo-project#1174)

* Replace ExceptWith & UnionWith with equal but faster functionality

* Optimization

* Optimization

* Optimize remove

* Update neo/Network/P2P/TaskManager.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Code optimization

* Update Helper.cs

* Small change

* Optimization

* Update Helper.cs

* Revert

* Optimization

* Optimize FIFOSet

* Rename

* Inline

* Update UT_FIFOSet.cs

* Fix

* Update UT_FIFOSet.cs

* Update FIFOSet.cs

* Update FIFOSet.cs

* Revert FIFOSet

* Update Helper.cs

* Optimize

* Reverting independet byte checks to SequenceEqual

* Unit tests for some auxiliary classes (neo-project#1192)

* Fix p2p filter unconnected peers (neo-project#1160)

* Remove the case of GetData in ProtocolHandlerMailbox#ShallDrop (neo-project#1201)

* Add GetFullBlocks P2P logic (enable fixing neo-project#522) (neo-project#1138)

* add GetFullBlocks P2P logic

* add missing new line

* allow request genesis block

* Optimization

* Update MessageCommand.cs

* - rename command
- fix protocol handler cast
- fix payload deserialization for default value

* change to ushort per review

* remove default count, rename class

* typo + failed refactor coverage ¯\_(ツ)_/¯

* Use base64 in JsonSerializer (neo-project#1199)

* Base64 Json

* No format

* Json Transaction optimization

* Change to Base64

* Revert some changes

* Revert

* Remove Helper.Base64

* Remove Base64FormattingOptions.None

* Optimize MerkleTree (3x) (neo-project#1203)

* Optimize MerkleTree

* Update MerkleTree.cs

* Update MerkleTree.cs

* Added more verbosity to CN logs (neo-project#1202)

* Add reason log for cn

* Update ConsensusService.cs

* Keep track of sender fee (neo-project#1183)

* Keep track of sender fee to avoid duplicate computation

* Code optimization

* Optimize

* Optimize

* Optimize

* Code optimization

* Correction

* Renaming currentFee to totalSenderFeeFromPool

* Renaming on Verify as well

* Add consideration for null Transactions

* Move sender fee recording systems to class SendersMonitor

* Code optimization

* Capitalize public items

* Code optimization

* Code optimization

* Optimization

* Code optimization

* Using problem description (neo-project#1214)

Using problem description helps problem grouping (people may propose different solutions for the same problem)

* Improve SYSCALLs: `Neo.Crypto.*` (neo-project#1190)

* Prevent XXE (3x) (neo-project#1229)

* Remove unnecessary logic from Mempool (neo-project#1216)

* Prevent remove storage flag when there are something stored (neo-project#1227)

* Add NeoAPI and update code after testing with NEO3 preview1 (neo-project#1150)

* Adding neo version to feature suggestion (neo-project#1240)

* Fix Base58 issues (3x) (neo-project#1224)

* Fix base58

* Optimize

* Update Base58.cs

* Revert some lines

* Rename

* Update Base58.cs

* Decrease the block time threshold (3x) (neo-project#1233)

* Fix 1244 Mempool.ReverifyTransactions (neo-project#1248)

* add internal to DB and WriteBatch

* reset db.cs writebatch.cs

* fix Nep5Token.Burn method

* format

* format

* reset and fix memorypool.ReverifyTransactions

* reset and fix ReverifyTransactions

* add ut

* remove commit

* fix BlockPersistAndReverificationWillAbandonTxAsBalanceTransfered.balance

* update comments

* Improve p2p message deserialization (neo-project#1262)

* Ensure that the block is valid before relay it on CheckCommits (neo-project#1220)

* Upgrade dependencies and target frameworks (neo-project#1178)

* Upgrade dependencies and target frameworks

* Update neo.csproj

* Remove BOM

* Restore net47 and Neo.VM v3.0.0-CI00042

* Remove net47

* Microsoft.EntityFrameworkCore.Sqlite v3.0.0

* Fix some of the tests

* Revert "Microsoft.EntityFrameworkCore.Sqlite v3.0.0"

This reverts commit b1c9d09.

* Neo.VM v3.0.0-CI00046

* Remove before_script

* FormatException

* Fixes

* Fixes

* Fix

* Update neo.csproj

* Neo.VM v3.0.0-CI00051

* Upgrade dependencies

* Disable warnings

* Upgrade UT dependencies

* Update neo.csproj

* Neo.VM v3.0.0-CI00170

* Move projects into folders (neo-project#1269)

* Remove Travis and use Github Actions (neo-project#1267)

* Optimize BigInteger (neo-project#1280)

* apply strict enum checking (neo-project#1254)

* Small optimizations using cached VM Script (neo-project#1215)

* Storage abstract (neo-project#1249)

* Allow to iterate a byte array inside the smart contract (neo-project#1281)

* Update changes

* Fix UT

* Rename

* Update ByteArrayWrapper.cs

* Support Neo.Iterator.Create

* Add ut and Rename

* Cover line

* Revert rename

* New plugin interface: IStoragePlugin (neo-project#1087)

* Optimize TaskManager (neo-project#1294)

* Cache `Transaction.Size` (neo-project#1282)

* Improving ConsensusService UT: Adding some coverage to OnPersistCompleted, OnPrepReq, OnPrepResponse, OnCommit and some auxiliary methods (neo-project#1169)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding Recovery and OnTimer coverage on CN UT

* Fixing files that should not be modified

* Fixing files that should not be modified II

* Greatly improving UT!

* Dotnet format

* Changing to 200ms

* More messages and casting asserts

* Forcing prepReq to 0 hashes because mempool is shared

* UT reaching Commit!

* Trying to check Commit for achieving a blockRelay. However, signatures need to match

* Trying to mock ECPoints. However, errors when GetWitness of Block after adding signatures

* Relaying block! Passing with sucess

* A little bit more coverage and ensure Block Relay event from LocalNode

* Cleaning thread

* Fixing duplicated index of preparation replication and other minor fix

* Returning prevHeader and block to original

* Retuning merkle root of block to original value

* dotnet format!

* Forcing an old timestamp for avoiding OnTimer

* Assert RecoveryMessage because of commitsent

* Improving variable and function names

* Cleaning and improving comments

* Updating blocktime

* Fixing nextconsensus expected hash due to some recent PR

* Capeslock on methods

* Trying to fix UT Consensus

* Increasing coverage for OnPersistCompleted

* Many workarounds but it is working again!

* dotnet format

* Cleaning UTs I

* Cleaninng UTs II

* Minor typo on variable

* Improving comments

* Adding some summary to methods

* Adding clone to the comment

* Adding variable to timestamp

* Removing other timestamps

* Remove Linq from ECDSA and UInt classes (neo-project#1283)

* Unify the BigInteger serialization standard with NeoVM (neo-project#1307)

* Optimizations for .NET Standard 2.1

* Change address version (neo-project#1299)

* Simple Way to Parallel Verification Transaction (neo-project#1298)

* Fix/Improve syncing (3x): Adding ping mechanism to TaskManager for replacing StartHeight and PendingKnownHashes strategy (neo-project#899)

* Remove leveldb

* Fix `InvPayload.CreateGroup()` (neo-project#1314)

* Add Blockchain UT for parallel TX (neo-project#1310)

* Allow users to more easily select MemoryStore. (neo-project#1311)

* Remove meaningless UT (neo-project#1317)

* Improve plugins (neo-project#1312)

* Fix typo (neo-project#1319)

* Neo.VM v3.0.0-CI00174 (neo-project#1320)

* Fix ToParameter() (neo-project#1323)

* Optimize ContractManifest.Clone() (neo-project#1328)

* Dispose ApplicationEngine after using (neo-project#1336)

* Update NeoVM nuget (neo-project#1331)

* Update dotnetcore.yml

* Improving UT consensus with new asserts, additional coverage for Recoveries (neo-project#1318)

* Improving UT consensus with new asserts

* Additional subscriber waits before Preparations

* Using @shargon tip for snapshot and increasing recovery coverage

* Trying to reload commits on Recovery. ping @shargon

* Cleaning and fixing wrong multisig being used to sign payload

* Checking the promising simple way

* Simplifing CreateStorageKey

* Fixing error on key and now engine is HALT

* Fixing commit Asert after Recovery!

* Minor typo fix on asserts

* Create function for creating StorageKey for Neo Native

* Trying to return Snapshot to original state

* Some tricks for modifying committed snaphost

* Cleaning

* Fixing Assert before subscriber wait

* Cleaning and leaving last check comment in case we need

* Simplifying mocking of nextvalidators

* Cleaning SignPayload

* Uncommenting code. Ensuring nondeterministic behavior after last recover

* Remove RPC (neo-project#1340)

* Remove some dependencies

* Update and rename dotnetcore.yml to main.yml

* Readme update (neo-project#1341)

* text update

* Remaining images

* Using tables, moving status

* Neo modules

* Fixing typo

* Fixing typo 2

* Fixing URL

* Using same name on titles

* Improve JSON (neo-project#1315)

* Adding some comments to P2P classes (neo-project#1212)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding some comments to Peers class

* Reverting change on ProtocolHandler

* dotnet format

* Additional comments

* Adding extra comments

* Fixing typo

* Fixing typo

* Fixing typo

* Adding more comments

* adding more comments

* Add some comments of P2P (neo-project#1303)

* add some comments of P2P

* fix

* Minor changes

* Minor changes

* Minor Changes

* Minor changes

* Minor changes

* dotnet format

* Minor changes

* Minor changes

* Additional comments

* Minor changes

* Reverting variable change

* Dotnet format

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* More optimizations about Span (neo-project#1352)

* Restrict the serialization (neo-project#1353)

* Adding contact information to manifest (neo-project#1246)

* Adding neo 2 metadata

* Double check

* Adding website and description

* Solution tests

* Dotnet format

* Using generic extra object

* Fix clone

* Removing manifest to test push

* Removing wrong file, renaming test

* Revert "Removing manifest to test push"

This reverts commit 4f57da4.

* Update src/neo/SmartContract/Manifest/ContractManifest.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Update src/neo/SmartContract/Manifest/ContractManifest.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Fixing tests

* JObject clone

* Dotnet format

* Null check

* Removing unecessary instantiation of primitive types

* Removing refenrece check, returning this

* Prevent Timer's lock with wrong dns (neo-project#1358)

* Prevent to lock Timer with wrong dns

* Parse dns en ProtocolSettings

* Update LocalNode.cs

* Update LocalNode.cs

* Update ProtocolSettings.cs

* Fix ut

* Update ProtocolSettings.cs

* Update UT_ProtocolSettings.cs

* dotnet format

* Process dns seeds in parallel

* Revert UT

* Revert protocol settings

* Update UT_ProtocolSettings.cs

* Update ProtocolSettings.cs

* Add comment

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Neo.VM.3.0.0-CI00190 (neo-project#1357)

* Fix SeedList initialization (neo-project#1363)

* AssemblyResolve (neo-project#1349)

* Rename SYSCALLs (neo-project#1362)

* Change the way to get RemoteNode from ActorSelection to RemoteNodes Dictionary  (neo-project#1354)

* update connections.tell

* optimise

* update

* add comment

* CallEx implementation (neo-project#1364)

* Link fixes (neo-project#1351)

* Set the price of RET to 0 (neo-project#1379)

* add data size check (neo-project#1381)

* Set limits in MerkleBlockPayload (3x) (neo-project#1377)

* Set limits in MerkleBlockPayload (3x)

* Update MerkleBlockPayload.cs

* Update src/neo/Network/P2P/Payloads/MerkleBlockPayload.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Update MerkleBlockPayload.cs

Co-authored-by: Erik Zhang <erik@neo.org>

* Neo.VM.3.0.0-CI00201 (neo-project#1374)

* Add relay-block-filter (neo-project#1380)

* add relay-block-filter

* modify

* modify

* modify

* modify

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Adding some comments to datacache (neo-project#1347)

* Adding some comments to datacache

* Adding Exception comment tip of @Tommo-L

Co-authored-by: Shargon <shargon@gmail.com>

* Rename CalculateNetWorkFee() (neo-project#1401)

* Use HashsetCache instead of FIFOSet for KnownHashes and SentHashes (neo-project#1389)

* update

* change fifoset to hashsetcache for knownhashes and senthashes

* format

* optimise HashSetCache

* remove FIFOSet

* remove FIFOSet and update ut

* change List to LinkedList

* remove bucket count upper limit

* update exception message

* Adding some comments

* dotnet format

* rename maxBucketCount

* format

* Cache count

* Vitor suggestions

* Update HashSetCache.cs

* format

* Fix

* fix counting count

* optimise

* optimse

* update List

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Add ContainsTransaction Recheck when ParallelVerifiedTransaction Received (neo-project#1408)

* add containsTx recheck

* add UT

* Update to just View check

* update

* revert

* Update UT_Blockchain.cs

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Enhance security (1) (neo-project#1403)

* inputs validation

* more validation

* recover constructor in ECPoint

* format

* minor changes

* format

* changes based on review

* recover validation in AesEncrypt

* Fix undefined layout behaviour, and remove pinning: Uint256 and Uint160 (neo-project#1387)

* Fix undefined layout behaviour, and remove pinning

* Update UInt256.cs

* Update UInt256.cs

* add StructLayout

* set pack=1

* Explicit

* Remove UIntBase

* Revert constructor

* add unsafe

* Comment

* Comment Uint256

* Removing comments from value 1

* Removing comments from value1

Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Allow to verify import blocks (neo-project#1415)

* Verify Import

* Default true

* Fix notifications (neo-project#1422)

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Add ID to ContractState (neo-project#1400)

* Fix dotnet-format (neo-project#1443)

* Add Salt and NEP2 to db3 wallet (neo-project#1444)

* NEP2

* Clean code

* Use MasterKey as passphrase

* Add Salt

* Unique Scrypt for all wallets

* Clean using

* Clean parameters

* Fix UT

* Random Salt

* fix ToStackItem issue (neo-project#1427)

* Allow MultiSig contracts in Wallet.Sign method (neo-project#1451)

* Allow to sign multisignature account if you have some of them

* Update IsMultiSigContract()

* Fixes UT

* Check null

* Update Wallet.cs

* Change if

Co-authored-by: Erik Zhang <erik@neo.org>

* update neo-vm version (neo-project#1456)

* Remove parallel verification (neo-project#1429)

* cast M to double (neo-project#1465)

* Read Fixed (neo-project#1454)

* Read Fixed

* format

* Rename

* Fix Consensus UT

* Add ut, and allow buffered streams

* Add ut, and allow buffered streams

* Change name

* Update Helper.cs

Co-authored-by: erikzhang <erik@neo.org>

* Adjust the Charge for Storage Writting (neo-project#1441)

* fix BigInteger0 storage outputs null  (neo-project#1471)

* Fix bug in contract update/destory (neo-project#1483)

* first commit

* format

* commit again

* format

* Burn sys_fee (neo-project#1430)

* Replace THROWIFNOT by ASSERT (neo-project#1475)

* Fix change password (neo-project#1490)

* Optimize the wallet UT (neo-project#1496)

* Limit the max height for some SYSCALLs (neo-project#1494)

* Send RelayResult to event stream (neo-project#1495)

* Add GasLeft syscall (neo-project#1509)

* Update akka to 1.4.2 (neo-project#1466)

* Optimize wallet tests (neo-project#1499)

* Optimize the wallet UT

* Optimize wallet UT test

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>

* rename bytearray to bytestring (neo-project#1524)

* rename bytearray to bytestring

* update dependency

* Support changing password for nep6 wallet (neo-project#1504)

* Remove UT_Culture (neo-project#1529)

* Optimize the wallet UT

* Optimize wallet UT test

* Test 2 culture

* Code optimization

* Delete UT_Culture

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>

* remove round up sysfee (neo-project#1522)

* Enable converting between public keys, script hashes and address (neo-project#1428)

* Enable converting between public keys, script hashes and address

* Add test cases

* Code optimization

* Fee adjusting

* Code optimization

* Add comment

* Code optimization

* Code optimization

* Merge from master

* Update InteropService.Contract.cs

* Code optimization

* Add wrong public key test cases

* Kick off new test

* format changing

* Code optimization

* Add comment

Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Fix SYSCALLs (neo-project#1511)

* Combine RemoteNode and ProtocolHandler (neo-project#1520)

* Fix akka warning (neo-project#1533)

* Tell RelayResult to the sender (neo-project#1548)

* Add abstract method Wallet.ChangePassword() (neo-project#1552)

* Network dependant signature (neo-project#1550)

* 3.0.0-preview2

* Vote for committee (neo-project#1491)

* Fix version

* Modify manifest according to the last amendment of NEP-3 (neo-project#1481)

* Sync try-catch opcodes (neo-project#1565)

* Fix plugin configuration falure (neo-project#1564)

* Add StackItem.ToJson() (neo-project#1569)

* Call _initialize() automatically (neo-project#1572)

* Remove grouping (neo-project#1566)

* Add GetCallFlags (neo-project#1587)

* Fix CallFlags (neo-project#1589)

* Simplify access to storage for native contracts. (neo-project#1583)

* Cache most recent block (neo-project#1592)

* Add StateLess to CallFlags (neo-project#1549)

* Add standard cryptography primitives (neo-project#1419)

* Datacache correction (neo-project#1611)

* Fix LocalNode (neo-project#1616)

* Remove ProtocolSettings Initialize

* Revert "Remove ProtocolSettings Initialize"

This reverts commit 58dda0b.

* Avoid calling ProtocolSettings.Default in multiple threads

Co-authored-by: Jin Qiao <jinqiao@neo.org>

* Update neo-vm package (neo-project#1624)

* Update neo.csproj

* Update all nugets

* Unify akka logs with neo logs (neo-project#1623)

* Unify akka logs

* Add event

* dotnet format

* Remove event

* Remove overload

* Clean changes

* Fix compilation error

* Simplify Logger

Co-authored-by: erikzhang <erik@neo.org>

* Remove FromJson (neo-project#1625)

* Unify unhandled exceptions (neo-project#1626)

* Core handle errors

* Unify UnhandledExceptions

* Remove empty line

* Move to NeoSystem

* Update NeoSystem.cs

* Allow log objects

* Change the source of UnhandledException

Co-authored-by: Erik Zhang <erik@neo.org>

* Make NEP6Wallet.path public (neo-project#1627)

* wallet-backup

* make path public

* case

* Abstract Path

* Improve

* Revert UT

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Add a change list to optimize datacache commit (neo-project#1619)

* Move cosigners to transaction attributes (neo-project#1620)

* First draft

* Remove dictonary

* Move json methods

* format

* Fix UT

* Fix Size

* clean code

* Fix UT

* Clean code

* Remove const

* Remove blank line

* Pluralize

* Allow multiple attributes of the same type

* Update src/neo/Wallets/Wallet.cs

* Fix some UT

* Fix UT

* Fix UT

* Update src/neo/Network/P2P/Payloads/CosignerAttribute.cs

Co-authored-by: Erik Zhang <erik@neo.org>

* Singular

* Move Cosigner to TransactionCollection

* Optimize empty

* Use ReflectionCache

* Change json format

* Rename

* Remove FromJson

* Optimize TransactionAttribute.ToJson()

* Rename

* Refactor

* Change the value of TransactionAttributeType.Cosigner

* Fix UTs

* Fix attribute order

* Remove TransactionAttributeCollection

* Reorder

* Revert some changes

* Revert some changes

Co-authored-by: Erik Zhang <erik@neo.org>

* Fix VerifyWitness (neo-project#1628)

* Modify iterators to public (neo-project#1639)

* modify iterators

* fix

* fix

* fix

* Revert "Improve gap calculation"

This reverts commit 9fa04a4.

* Revert "Revert "Improve gap calculation""

This reverts commit e920732.

* Use config from current working dir (neo-project#1622)

* Use config from current dir

* Search in multiple places

* Make Plugin.Path be virtual

* Not found command (neo-project#1645)

* Not found command

* Remove unused method

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Subscribe to RelayResult messages in ConsensusService (neo-project#1647)

* Create only one snapshot for persist (neo-project#1602)

* Remove OnPersistCompleted()

* Optimize Blockchain.cs

* Move namespace

* Decouple NativeContract from InteropService. (neo-project#1649)

* Optimize the `GetPrice()` mechanism of SYSCALLs (neo-project#1650)

* fix the way to get the directory path of assembly (neo-project#1656)

* Ask for mempool after sync (neo-project#1544)

* Query mempool if I have less tx than the remote node

* Revert some changes

* Wait for verack

* Clean file

* Move to verack

* Wait for block sync

* Clean changes

* Only accept one mempool message per remote node

* Remove one variable

* Revert "Only accept one mempool message per remote node"

This reverts commit 359a3bb.

* Optimize

* Check it in TaskManager

* Update src/neo/Network/P2P/TaskSession.cs

Co-authored-by: Luchuan <luchuan@neo.org>

* Revert

* fix MemPoolTaskHash (neo-project#1660)

* Fix ms bug

* private

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: Erik Zhang <erik@neo.org>

* Remove CommitteeMembersCount and ValidatorsCount from Blockchain.cs

* Fix policy check (neo-project#1668)

* fix policy check

* Rename

* Fix GetCommitteeAddress()

Co-authored-by: erikzhang <erik@neo.org>

* Inventory message stream optimization (neo-project#1667)

* Rename

* Refactor InteropService (neo-project#1655)

* Optimize TransactionAttribute (neo-project#1674)

* Add MPT (neo-project#1442)

* Fix DataCache.Find (neo-project#1673)

* GetBlocks by block index (neo-project#1397)

* add description field (neo-project#1678)

* Fix duplicate connection (neo-project#1685)

* fix duplicate connection

* fix comments

* Rename to AllowNewConnection

* fix

* Fix comment

* fix

* Rename

* Remove useless check

* Update

* Update LocalNode.cs

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Check the parameters count (neo-project#1695)

* Add RIPMED60 to syscall in ApplicationEngine.Crypto (neo-project#1694)

* Add Hash160 and Hash256 to syscall

* remove unnecessary reference

* format fix

* provide RIPMED160 instead of Hash256 and Hash160
Add RIPMED160 UT

Co-authored-by: Erik Zhang <erik@neo.org>

* Refactor NativeContract (neo-project#1693)

* Close neo-project#1696

* Add MaxBlockSystemFee (neo-project#1689)

* add max block system fee

* fix tx

* fix and add more ut

* format

* optimze code

* Reset maxblocksystem = 9000/GAS

* Update src/neo/SmartContract/Native/PolicyContract.cs

Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>

* Remove new line in log

* Update ConsensusService.cs

* up Prefix_MaxBlockSize as skiptable.insert

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>

* Add event name to System.Runtime.Notify() (neo-project#1701)

* Check return value of contracts (neo-project#1680)

* Check Json.Serialize map keys (neo-project#1705)

* Always return a value for public methods (neo-project#1706)

* Update to Neo.VM.3.0.0-CI00226 (neo-project#1713)

* Create callback (neo-project#1629)

* Merge

* Invoke callback

* dotnet-format

* Change UT for two args

* callbacks

* Syscall callback UT

* rename

* Rename

* Clean

* Clean again :P

* Rename

* Fix CurrentContext scope

* Rename

* abstract class

* Erik's feedback

* change ut

* fix ut

* Move to new namespace

* Move callback logic to ApplicationEngine

* Add TODO

* We don't need to check the CallFlags

* Remove RaiseLoadContext() and RaiseOnSysCall()

* Fix UT

* Add MethodCallback

* Update neo.csproj

* Fix compile

* Don't need to check the return value any more.

* Add AllowCallback to InteropDescriptor

* Modify the prices

* Fix

Co-authored-by: erikzhang <erik@neo.org>

* Add StrictUTF8 (neo-project#1710)

* Restrict notifications (neo-project#1708)

* fix storage fee

* fix

* Optimize

* Fix

* Real Fi

* apply

* Correct the formula

* fix ut

Co-authored-by: Igor Machado Coelho <igor.machado@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: zhangtao <ztgoforit@163.com>
Co-authored-by: Charis Zhao <eryeer@163.com>
Co-authored-by: belane <belane@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Yongjie Ma <20391402+yongjiema@users.noreply.github.com>
Co-authored-by: Ricardo Prado <38396062+lock9@users.noreply.github.com>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>
Co-authored-by: Erik van den Brink <git@erikvandenbrink.com>
Co-authored-by: Qiao-Jin <43407364+Qiao-Jin@users.noreply.github.com>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: doubiliu <liumengyu@neo.org>
Co-authored-by: ShawnYun <42930111+ShawnYun@users.noreply.github.com>
Co-authored-by: joeqian <qianzhuo@ngd.neo.org>
Co-authored-by: cn1010 <1062108372@qq.com>
Co-authored-by: John <johnkellyoxford@gmail.com>
Co-authored-by: doubiliu <liumengyu@ngd.neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: cn1010 <baoting@onchain.com>
Co-authored-by: lichen <48947753+Lichen9618@users.noreply.github.com>
Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>
cloud8little added a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
* dotnet format (neo-project#983)

* Fixes `NeoToken.CalculateBonus()` (neo-project#992)

* Small cache changes (neo-project#994)

* Cache changes

* Update UT_Cache.cs

* Fixes `GetRegisteredValidators()` (neo-project#991)

* Fix/travis parallel jobs (neo-project#987)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* split travis jobs

* add -v n

* Fixes neo-project#999

* Add and update some Unit tests in IO module (neo-project#998)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* update IO module test

* delete empty line

* changename

* delete empty line

* revert commit

* Fix (neo-project#1008)

* Fix for 1005 (neo-project#1006)

* Fix null values during ChangeViewReason (neo-project#1016)

* Avoid processing own hashes (3x) (neo-project#1009)

* Avoid processing own hashes

* Shargon's suggestion I

* Shargon's suggestion II

* rename

* Scoped signatures (neo-project#968)

* Base

* Check Witness

* Fix some unit tests

* More ut fixes

* Clean code

* Fix more unit tests

* Fake witness for make transfer

* Fix ut

* Simplifying if

* rename to RootAccess

* adding scope type, preparing for cosigners

* reading scope from stream

* attaching CosignerUsage

* calculate scope size

* Finish cosigner usage

* Global constant

* Clean

* AsSerializable @erikzhang

* avoiding empty scope data serialization

* fix logic

* moved scopes to Transaction

* fixed tests

* Change CheckWitness

* Follow the standard

* rename var

* Remove FakeWitness

* Fix cosigner ussage

* Clean

* Fix CosignerUsage

* fix RootAccess

* removed not null

* fixed malformed tx generation

* no need for attribute on all test tx

* testing sizes

* renamed RootAccess to EntryOnly, and explained enum compositions

* discovering which size is wrong

* Remove spaces

* doubts on scope sign test

* removing scopes everywhere

* wrong tx size

* fixed tests

* remove print

* more scope tests

* reorder

* revert changes on Witness

* Modify CheckWitness

* Reduce changes

* Fix Cosigner usage

* Combine CosignerUsage

* Indent

* filtering groups by pubkey

* Organize

* Rename ScriptHash to Account

* renamed EntryOnly to CalledByEntry

* dotnet format

* fix file UT_CosignerUsage

* tests for double cosigners

* assert catch exceptions

* clean and format

* improvements

* Format ut exceptions

* Rename ut

* Remove changes

* Follow comment standard

* Rename to Cosigner

* Move cosigners outside

* Clean comments

* Reorder the parameters

* Fix unit tests

* limit max cosigners by 16 (same as attributes)

* testing non-distinct cosigners

* respect max cosigners

* MaxSubitems

* test CalledByEntry together with GAS

* Update comment

* Clean comments

* Global=0

* Fix ut

* broken test for combination Global | NEO

* back to global 0x80

* global back to 0x00, as default

* Update comment

* Improving the use of `RelayCache` on `ProtocolHandler` (neo-project#1014)

* Refactoring and simplifing the use of relaycache

* Standarzing name

* simplify

* Fix the potential risk to get null CurrentHeaderHash from Blockchain (neo-project#1033)

* Unit Test for Wallets Module (neo-project#1018)

* testDemo

* add dll lib

* add dbsnapshot dispose

* test get blocks in levelDBStore

* add levelDBStore test funcs

* fix levelDBStore funcs

* add DbCache addInternal

* differ db path

* space

* fix delete internal test

* add test getInternal tryGetInternal move libleveldb.dll

* add dbCache method test

* add store test

* add cache unit tests

* add cache unit tests

* up readonly max_capacity

* fix leveldbexception

* fix comment on UT_Cache

* format

* fix multithread test problem

* up cache

* update travis config

* update travis.yml

* test DbMetaDataCache

* fix db directory

* format and update travis for maxos

* fix mac env travis

* 2019/7/12 10:34

* 2019/7/12 11:01

* remove commented line

* test BigDecimal

* fix format and csproj

* rm  coverage.opencover.xml

* update method name

* add UT_P_Helper

* modify UT_P_Helper

* modify UT_P_helper

* Clean ut

* test Base58 & BloomFilter

* Update UT_Cache.cs

* Correct Typo

* test JsonArray

* update namespace

* update namespace

* update format

* update format

* organise folder structure

* add UT_JString

* test JBoolean JNumber & JObject

* 2019/7/16 10:30

add some test case for UInt32Wrapper and SerializableWrapper

* fix timestamp

* test ECDsa and Crypto

* test OrderedDictionary & complete IO.Json tests

* 2019/7/16 17:33

add some test case of SQLiteWallet

* test FIFOSet

* add CloneCache and DataCache unit tests

* fix namespace

* add UT_Cryptography_Helper

* format UT_CloneCache and UT_DataCache

* add UT_DataCache.GetAndChange unit test

* update namespace

* remove comment code

* delete Persistence part

* 2019/7/19 11:07

add some test case for Helper in VM

* Fix Base58 Test

* 2019/7/19 11:33

change some format

* update IOHelper exception assert

* 2019/7/19 14:22

change format

* format IOHelper

* review IO.Wrapper

* review Wallets.SQLite UT

* Test ECFieldElement ECPoint

* refactor package

* format ECDsa

* update namespace

* Code fix

* review cache

* modify UT_JString

* fomat

* using Actin replace with try-catch

* add UT_CloneMetaCache and UT_MetaDataCache

* update namespace

* format UT_DataCache.cs

* Code Fix

* format

* update csproj

* Code fix for UT_ECFieldElement and UT_ECPoint

* Code fix

* format

* update travis

* delete deleteFiles

* fix path and comment

* update travis

* delete test ToTimeStamp

* format UT_*Cache

* update format

* fomat

* use hex extensions in Cryptography_Helper

* remove reflection

* optimization of UT_DataCache

* update namespace

* modify TestSha256

* update UT in crypto module

* Rename UT_Scrypt.cs to UT_SCrypt.cs

* format

* update UT_Murmur3

* update IO module test

* delete empty line

* changename

* delete empty line

* revert commit

* add wallet test

* update testUtil

* delete empty line

* Update UT_NEP6Wallet.cs

* update ut

* Optimize wallet test

* fix

* add change

* fix nep6wallet

* Fix

* Optimize

* fix optimize

* fix

* Optimize

* Revert Console.WriteLine (neo-project#986)

* Set max block size (neo-project#953)

* Draft

* Take into account p2p max payload

* Move max allowed to policy

* Check block size on prepResponse

* Change reason

* Prevent overflow

* Optimization

* Reduce the length of the array

* Organizing consensus code

* Revert "Organizing consensus code"

This reverts commit 94a29dc.

* Remove Policy UT

* Resolve Policy conflicts

* prepare unit test

* Small unit test

* More ut

* Add one check

* Clean using

* Organizing consensus and comments

* Split unit test

* UT check block size

* Clean

* Expected witness size

* optimize

* Remove fakeWitness

* Format comments

* rename var

* Add (..)

* Remove SetKey method

* Centralize expected block size

* Optimize

* Fix

* Add one test

* Optimize `EnsureMaxBlockSize()`

* Fix unit tests

* Rename

* Indent

* Vitor suggestion

* Merge with Scoped signatures

* Remove extra line

* Revert "Remove extra line"

This reverts commit e134881.

* Remove extra line

* GitHub Contribution Guide  (neo-project#1028)

Adding GitHub Contribution Guide

* Optimize `GetHeader()` and `GetBlock()` (neo-project#1039)

* Update policy - Add maximum witness size (in bytes) (neo-project#1020)

* Max witness size

* Add error test

* Rename class

* allow 10/10

* rounding up to 1024 bytes

* Error with 11

* Fix ut

* Update VM to last changes (neo-project#1048)

* Update VM to last changes

* Remove hashes

* dotnet format (neo-project#1054)

* dotnet format

* fix CRLF

* Fix consensus problem for proposed blocks with zero transactions (neo-project#1053)

* Fix consensus (CRLF)

* Removing unnecessary lines changes - Cleaning PR

* Reverting all changes on CC

* Modifying ConsensusContext with proposed changes

* Small OnPersist optimization (neo-project#1058)

* Small update

* Cache native persist script

* fix crlf on neo.UnitTests and set all files to not use BOM (byte order mark) (neo-project#1057)

* Check dotnet format in travis

* Try to find the path

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Format travis

* test and source

* test and source

* Move to before the script

* testing if CRLF format is respected

* fix crlf on unit tests

* testing for crlf on unit tests too

* all utf-8

* neo/ on utf8 too

* looks like sudo is needed by travis

* download dos2unix 7.4.0

* temporaly remove | test

* back to | test

* explicit test zero

* no bom

* more non-boom to boom

* ensuring no_bom at all files

* Printing files with bom prefix

* Check both folders in one command

* Add verbosity

* Create .editorconfig

* Ensure the path of .editorconfig file

* Update .editorconfig

* Update .editorconfig

* Update .editorconfig

* use only dotnet-format

Is confirmed that .editorconfig works, so we should configure only this file

* basic formatting (just 5 files affected)

* dotnet version

* new lines on end

* update travis

* advice on auto crlf

* Update .travis.yml

* Update .travis.yml

* enforcing lf

* Fix dotnet format version

* removed dos2unix

* Exposing supported methods used by InteropService (neo-project#1060)

* Supported methods names

* dotnet format

* Simplify

* Remove lines of code (neo-project#1062)

It's not working

* Cleaning .editorconfig file (neo-project#1067)

* Hide the prefix in the store (neo-project#1070)

* Fixes `Transaction.ToJson()` (neo-project#1071)

* Fixes `Transaction.ToJson()`

* Fix tests

* Optimize mempool message (neo-project#1068)

* Optimization

* Prevent relay

* Change comment

* Optimizations

* Fix Runtime_GetNotifications (neo-project#1073)

* empty scripthash, all notifications (neo-project#1074)

* empty scripthash, all notifications

* || to &&

* Fix ut

* Issues templates for Bug report and Feature Request (neo-project#1034)

* Update NuGets (neo-project#1080)

* Update NuGets

* Clean BOM

* Update Neo.VM

* Downgrade Sqlite to 2.1.4 (neo-project#1086)

* Fix consensus (neo-project#1083)

* v3.0.0-preview1

* C# SDK Add Transaction Manager and Smart Contract APIs (neo-project#1026)

* Add NEO SDK based on RPC client

* add rpc interface methods for neo3

* update unit test

* add unit test

* Update TransactionHelper.cs

Changed for neo 3.0, not final yet.

* implement sdk rpc client methods

* backup files

* change class name

* remove uncompleted modules for pull request

* change json deserialize method with Neo JObject

* modified JSON implementation, added FromJson()

* more RPC change

* PR correction

* RPC module fix, remove newton.json

* fix

* fix getblock issue

* PR correction

* PR Correction

* PR Correction: rename RPC models

* PR Correction

* resolve conflicts

* Clean code

* Clean code

* Clean code

* Clean code

* Update RpcValidateAddressResult.cs

* Clean code

* PR correction

* Move test file to the right place

* Added SDK Transaction module.

* Add SDK SmartContract module

* height = count - 1

* Add sign function for TxManager

* Add Deploy Contract

* Add unit tests

* Add Network Fee calculate for TxManager,
add unit tests

* adjust cosigners change

* PR Correction

* Remove empty line

* Rename TxManager to TransactionManager

* PR correction

* PR correction

* change namespace

* Reorder methods

* Remove TransactionContext

* fix unit test

* Remove `virtual`

* Remove virtuals

* Remove ScriptHash from KeyPair

* Add comments

* Add comments

* Adjust to Neo_Contract_Create parameter

* use default mainfest

* fix unit test

* Fix typo

* use manifest as parameter

* add cosigner for nep5 transfer

* code clean

* Update neo.UnitTests/Network/RPC/UT_RpcClient.cs

Co-Authored-By: Shargon <shargon@gmail.com>

* move MakeScript to VM.Helper

* Add unit test for InteropInterface

* PR Correction

* Add unit test

* Template fix (neo-project#1107)

* Fixing template

* Fix

* Unit test For Legder module (neo-project#1038)

* update test ledger

* format

* Add enter between classes

* fix ut suggestion

* Update UT_PoolItem.cs

* Update UT_MemoryPool.cs

* Reduce usings

* Reduce changes

* More details on TestReVerifyTopUnverifiedTransactionsIfNeeded and fixed comment on ReVerifyTopUnverifiedTransactionsIfNeeded

* Minor fix on generic transaction generation fee

* Applying dotnet format

* Enhance functions in TestDataCache

* dotnet format

* Cast refactor

* comment tx3 for mempool

* Removing TODO comment

* Fix tx reverify (neo-project#1116)

* add internal to DB and WriteBatch

* tx.reverify add hashes.length != witnesses.length condition

* reset db.cs writebatch.cs

* format

* Add `vmState` field in rpc getrawtransaction result (neo-project#1117)

* add internal to DB and WriteBatch

* add vmstate field in rpc getrawtransaction result

* reset db.cs writebatch.cs

* Optimize

* Update RpcServer.cs

* Format

* Update RpcServer.cs

* Update RpcTransaction.cs

* Update UT_RpcClient.cs

* Fixes `RpcTransaction.VMState`

* Speed up travis (neo-project#1136)

* Speed up

* Update UT_NEP6Wallet.cs

* Speed ut

* More speed up

* Format

* Remove blank line

* Reduce travis verbosity

* Coverage only on linux

* CollectCoverage only if is needed

* Update .travis.yml

* Already build

* no-restore

* Update .travis.yml

* Back verbosity

* Update netcore version

* Remove BOM

* Update nugets

* Fix fluent update

* Paralellize

* format

* Update .travis.yml

* Fix

* Update .travis.yml

* Min verbose

* Remove parallel execution

* Fix change

* Revert AsParallel()

* Simplify and improve consensus payload serialization and deserialization (neo-project#1149)

* Simplify and improve consensus payload serialiation

* Simplyfing read

* Function return instead of out parameter

* Reorganize

* Update UT_IOHelper.cs

* Improve the random security (neo-project#1145)

* Remove global randoms

* Wallet

* Optimize

* Use random class

* Revert wallet

* Simplifying access to Transactions and Blocks in syscalls (neo-project#1081)

* Add Transaction.Sender and Transaction.Script

* Allow to get the current Transaction

* Update unit test, refactor transactions methods

* UT

* Summary TX object inside VM

* Revert some changes

* Refactor to new model and UT

* Fix

* Reduce conditional

* Fix ut

* Fix ut

* Change order

* Block

* Some fixes

* Fix comment

* Fix comments

* Move hash to the top

* Remove GetHeader

* Remove GetHeader

* Block with transactions count

* Migrate ContractState

* Format

* Close neo-project#1096

Close neo-project#1096

* Update nulls

* Remove Neo.Account.IsStandard

* Revert last change

* Fix Unit tests

* Remove unused var

* TrimmedBlock

* Change fee

* Neo.VM v3.0.0-CI00041

* Neo.VM v3.0.0-CI00042

* Rename

* ContractNullParameter

* Clean using

* Revert Null in ContractParameterType

* Fix two ToLower calls (neo-project#1155)

* Notification limits (neo-project#1100)

* Fix GetTransactionFromBlock Syscall (neo-project#1170)

* Fix Syscall

* Fix

* Unit Test for Smartcontract Module (neo-project#1090)

* submit ut

* fix

* Enhance functions in TestDataCache

* git amend blockchain

* fix test related to TestDataCache

* dotnet format

* dotnet format

* add blank line

* fix test

* Optimize random

* Optimize Random

* fix test

* add decimal test

* fix

* 2019/9/25 16:54

change format

* Fixes events

* update assertion sentence

* update UT following code change

* format

* add type check

* recommit

* recommit

* Ensure txs are cleared before Blockchain actor (neo-project#1166)

* Unit Test For RPC Module (neo-project#1111)

* fix payload limits (neo-project#1194)

* Fix JsonSerializer (neo-project#1197)

* Fix neo-project#1128 (neo-project#1129)

* Fix neo-project#1128

* Update BlockBase.cs

* Add shutdown event for plugins (neo-project#1195)

* add shutdown event for plugins

* use IDisposable

* dispose plugins first

* Removing brackets

* Replace function exceptwith and unionwith with faster functions  (neo-project#1174)

* Replace ExceptWith & UnionWith with equal but faster functionality

* Optimization

* Optimization

* Optimize remove

* Update neo/Network/P2P/TaskManager.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Code optimization

* Update Helper.cs

* Small change

* Optimization

* Update Helper.cs

* Revert

* Optimization

* Optimize FIFOSet

* Rename

* Inline

* Update UT_FIFOSet.cs

* Fix

* Update UT_FIFOSet.cs

* Update FIFOSet.cs

* Update FIFOSet.cs

* Revert FIFOSet

* Update Helper.cs

* Optimize

* Reverting independet byte checks to SequenceEqual

* Unit tests for some auxiliary classes (neo-project#1192)

* Fix p2p filter unconnected peers (neo-project#1160)

* Remove the case of GetData in ProtocolHandlerMailbox#ShallDrop (neo-project#1201)

* Add GetFullBlocks P2P logic (enable fixing neo-project#522) (neo-project#1138)

* add GetFullBlocks P2P logic

* add missing new line

* allow request genesis block

* Optimization

* Update MessageCommand.cs

* - rename command
- fix protocol handler cast
- fix payload deserialization for default value

* change to ushort per review

* remove default count, rename class

* typo + failed refactor coverage ¯\_(ツ)_/¯

* Use base64 in JsonSerializer (neo-project#1199)

* Base64 Json

* No format

* Json Transaction optimization

* Change to Base64

* Revert some changes

* Revert

* Remove Helper.Base64

* Remove Base64FormattingOptions.None

* Optimize MerkleTree (3x) (neo-project#1203)

* Optimize MerkleTree

* Update MerkleTree.cs

* Update MerkleTree.cs

* Added more verbosity to CN logs (neo-project#1202)

* Add reason log for cn

* Update ConsensusService.cs

* Keep track of sender fee (neo-project#1183)

* Keep track of sender fee to avoid duplicate computation

* Code optimization

* Optimize

* Optimize

* Optimize

* Code optimization

* Correction

* Renaming currentFee to totalSenderFeeFromPool

* Renaming on Verify as well

* Add consideration for null Transactions

* Move sender fee recording systems to class SendersMonitor

* Code optimization

* Capitalize public items

* Code optimization

* Code optimization

* Optimization

* Code optimization

* Using problem description (neo-project#1214)

Using problem description helps problem grouping (people may propose different solutions for the same problem)

* Improve SYSCALLs: `Neo.Crypto.*` (neo-project#1190)

* Prevent XXE (3x) (neo-project#1229)

* Remove unnecessary logic from Mempool (neo-project#1216)

* Prevent remove storage flag when there are something stored (neo-project#1227)

* Add NeoAPI and update code after testing with NEO3 preview1 (neo-project#1150)

* Adding neo version to feature suggestion (neo-project#1240)

* Fix Base58 issues (3x) (neo-project#1224)

* Fix base58

* Optimize

* Update Base58.cs

* Revert some lines

* Rename

* Update Base58.cs

* Decrease the block time threshold (3x) (neo-project#1233)

* Fix 1244 Mempool.ReverifyTransactions (neo-project#1248)

* add internal to DB and WriteBatch

* reset db.cs writebatch.cs

* fix Nep5Token.Burn method

* format

* format

* reset and fix memorypool.ReverifyTransactions

* reset and fix ReverifyTransactions

* add ut

* remove commit

* fix BlockPersistAndReverificationWillAbandonTxAsBalanceTransfered.balance

* update comments

* Improve p2p message deserialization (neo-project#1262)

* Ensure that the block is valid before relay it on CheckCommits (neo-project#1220)

* Upgrade dependencies and target frameworks (neo-project#1178)

* Upgrade dependencies and target frameworks

* Update neo.csproj

* Remove BOM

* Restore net47 and Neo.VM v3.0.0-CI00042

* Remove net47

* Microsoft.EntityFrameworkCore.Sqlite v3.0.0

* Fix some of the tests

* Revert "Microsoft.EntityFrameworkCore.Sqlite v3.0.0"

This reverts commit b1c9d09.

* Neo.VM v3.0.0-CI00046

* Remove before_script

* FormatException

* Fixes

* Fixes

* Fix

* Update neo.csproj

* Neo.VM v3.0.0-CI00051

* Upgrade dependencies

* Disable warnings

* Upgrade UT dependencies

* Update neo.csproj

* Neo.VM v3.0.0-CI00170

* Move projects into folders (neo-project#1269)

* Remove Travis and use Github Actions (neo-project#1267)

* Optimize BigInteger (neo-project#1280)

* apply strict enum checking (neo-project#1254)

* Small optimizations using cached VM Script (neo-project#1215)

* Storage abstract (neo-project#1249)

* Allow to iterate a byte array inside the smart contract (neo-project#1281)

* Update changes

* Fix UT

* Rename

* Update ByteArrayWrapper.cs

* Support Neo.Iterator.Create

* Add ut and Rename

* Cover line

* Revert rename

* New plugin interface: IStoragePlugin (neo-project#1087)

* Optimize TaskManager (neo-project#1294)

* Cache `Transaction.Size` (neo-project#1282)

* Improving ConsensusService UT: Adding some coverage to OnPersistCompleted, OnPrepReq, OnPrepResponse, OnCommit and some auxiliary methods (neo-project#1169)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding Recovery and OnTimer coverage on CN UT

* Fixing files that should not be modified

* Fixing files that should not be modified II

* Greatly improving UT!

* Dotnet format

* Changing to 200ms

* More messages and casting asserts

* Forcing prepReq to 0 hashes because mempool is shared

* UT reaching Commit!

* Trying to check Commit for achieving a blockRelay. However, signatures need to match

* Trying to mock ECPoints. However, errors when GetWitness of Block after adding signatures

* Relaying block! Passing with sucess

* A little bit more coverage and ensure Block Relay event from LocalNode

* Cleaning thread

* Fixing duplicated index of preparation replication and other minor fix

* Returning prevHeader and block to original

* Retuning merkle root of block to original value

* dotnet format!

* Forcing an old timestamp for avoiding OnTimer

* Assert RecoveryMessage because of commitsent

* Improving variable and function names

* Cleaning and improving comments

* Updating blocktime

* Fixing nextconsensus expected hash due to some recent PR

* Capeslock on methods

* Trying to fix UT Consensus

* Increasing coverage for OnPersistCompleted

* Many workarounds but it is working again!

* dotnet format

* Cleaning UTs I

* Cleaninng UTs II

* Minor typo on variable

* Improving comments

* Adding some summary to methods

* Adding clone to the comment

* Adding variable to timestamp

* Removing other timestamps

* Remove Linq from ECDSA and UInt classes (neo-project#1283)

* Unify the BigInteger serialization standard with NeoVM (neo-project#1307)

* Optimizations for .NET Standard 2.1

* Change address version (neo-project#1299)

* Simple Way to Parallel Verification Transaction (neo-project#1298)

* Fix/Improve syncing (3x): Adding ping mechanism to TaskManager for replacing StartHeight and PendingKnownHashes strategy (neo-project#899)

* Remove leveldb

* Fix `InvPayload.CreateGroup()` (neo-project#1314)

* Add Blockchain UT for parallel TX (neo-project#1310)

* Allow users to more easily select MemoryStore. (neo-project#1311)

* Remove meaningless UT (neo-project#1317)

* Improve plugins (neo-project#1312)

* Fix typo (neo-project#1319)

* Neo.VM v3.0.0-CI00174 (neo-project#1320)

* Fix ToParameter() (neo-project#1323)

* Optimize ContractManifest.Clone() (neo-project#1328)

* Dispose ApplicationEngine after using (neo-project#1336)

* Update NeoVM nuget (neo-project#1331)

* Update dotnetcore.yml

* Improving UT consensus with new asserts, additional coverage for Recoveries (neo-project#1318)

* Improving UT consensus with new asserts

* Additional subscriber waits before Preparations

* Using @shargon tip for snapshot and increasing recovery coverage

* Trying to reload commits on Recovery. ping @shargon

* Cleaning and fixing wrong multisig being used to sign payload

* Checking the promising simple way

* Simplifing CreateStorageKey

* Fixing error on key and now engine is HALT

* Fixing commit Asert after Recovery!

* Minor typo fix on asserts

* Create function for creating StorageKey for Neo Native

* Trying to return Snapshot to original state

* Some tricks for modifying committed snaphost

* Cleaning

* Fixing Assert before subscriber wait

* Cleaning and leaving last check comment in case we need

* Simplifying mocking of nextvalidators

* Cleaning SignPayload

* Uncommenting code. Ensuring nondeterministic behavior after last recover

* Remove RPC (neo-project#1340)

* Remove some dependencies

* Update and rename dotnetcore.yml to main.yml

* Readme update (neo-project#1341)

* text update

* Remaining images

* Using tables, moving status

* Neo modules

* Fixing typo

* Fixing typo 2

* Fixing URL

* Using same name on titles

* Improve JSON (neo-project#1315)

* Adding some comments to P2P classes (neo-project#1212)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding some comments to Peers class

* Reverting change on ProtocolHandler

* dotnet format

* Additional comments

* Adding extra comments

* Fixing typo

* Fixing typo

* Fixing typo

* Adding more comments

* adding more comments

* Add some comments of P2P (neo-project#1303)

* add some comments of P2P

* fix

* Minor changes

* Minor changes

* Minor Changes

* Minor changes

* Minor changes

* dotnet format

* Minor changes

* Minor changes

* Additional comments

* Minor changes

* Reverting variable change

* Dotnet format

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* More optimizations about Span (neo-project#1352)

* Restrict the serialization (neo-project#1353)

* Adding contact information to manifest (neo-project#1246)

* Adding neo 2 metadata

* Double check

* Adding website and description

* Solution tests

* Dotnet format

* Using generic extra object

* Fix clone

* Removing manifest to test push

* Removing wrong file, renaming test

* Revert "Removing manifest to test push"

This reverts commit 4f57da4.

* Update src/neo/SmartContract/Manifest/ContractManifest.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Update src/neo/SmartContract/Manifest/ContractManifest.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Fixing tests

* JObject clone

* Dotnet format

* Null check

* Removing unecessary instantiation of primitive types

* Removing refenrece check, returning this

* Prevent Timer's lock with wrong dns (neo-project#1358)

* Prevent to lock Timer with wrong dns

* Parse dns en ProtocolSettings

* Update LocalNode.cs

* Update LocalNode.cs

* Update ProtocolSettings.cs

* Fix ut

* Update ProtocolSettings.cs

* Update UT_ProtocolSettings.cs

* dotnet format

* Process dns seeds in parallel

* Revert UT

* Revert protocol settings

* Update UT_ProtocolSettings.cs

* Update ProtocolSettings.cs

* Add comment

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Update LocalNode.cs

* Neo.VM.3.0.0-CI00190 (neo-project#1357)

* Fix SeedList initialization (neo-project#1363)

* AssemblyResolve (neo-project#1349)

* Rename SYSCALLs (neo-project#1362)

* Change the way to get RemoteNode from ActorSelection to RemoteNodes Dictionary  (neo-project#1354)

* update connections.tell

* optimise

* update

* add comment

* CallEx implementation (neo-project#1364)

* Link fixes (neo-project#1351)

* Set the price of RET to 0 (neo-project#1379)

* add data size check (neo-project#1381)

* Set limits in MerkleBlockPayload (3x) (neo-project#1377)

* Set limits in MerkleBlockPayload (3x)

* Update MerkleBlockPayload.cs

* Update src/neo/Network/P2P/Payloads/MerkleBlockPayload.cs

Co-Authored-By: Erik Zhang <erik@neo.org>

* Update MerkleBlockPayload.cs

Co-authored-by: Erik Zhang <erik@neo.org>

* Neo.VM.3.0.0-CI00201 (neo-project#1374)

* Add relay-block-filter (neo-project#1380)

* add relay-block-filter

* modify

* modify

* modify

* modify

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Adding some comments to datacache (neo-project#1347)

* Adding some comments to datacache

* Adding Exception comment tip of @Tommo-L

Co-authored-by: Shargon <shargon@gmail.com>

* Rename CalculateNetWorkFee() (neo-project#1401)

* Use HashsetCache instead of FIFOSet for KnownHashes and SentHashes (neo-project#1389)

* update

* change fifoset to hashsetcache for knownhashes and senthashes

* format

* optimise HashSetCache

* remove FIFOSet

* remove FIFOSet and update ut

* change List to LinkedList

* remove bucket count upper limit

* update exception message

* Adding some comments

* dotnet format

* rename maxBucketCount

* format

* Cache count

* Vitor suggestions

* Update HashSetCache.cs

* format

* Fix

* fix counting count

* optimise

* optimse

* update List

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Add ContainsTransaction Recheck when ParallelVerifiedTransaction Received (neo-project#1408)

* add containsTx recheck

* add UT

* Update to just View check

* update

* revert

* Update UT_Blockchain.cs

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Enhance security (1) (neo-project#1403)

* inputs validation

* more validation

* recover constructor in ECPoint

* format

* minor changes

* format

* changes based on review

* recover validation in AesEncrypt

* Fix undefined layout behaviour, and remove pinning: Uint256 and Uint160 (neo-project#1387)

* Fix undefined layout behaviour, and remove pinning

* Update UInt256.cs

* Update UInt256.cs

* add StructLayout

* set pack=1

* Explicit

* Remove UIntBase

* Revert constructor

* add unsafe

* Comment

* Comment Uint256

* Removing comments from value 1

* Removing comments from value1

Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Allow to verify import blocks (neo-project#1415)

* Verify Import

* Default true

* Fix notifications (neo-project#1422)

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Add ID to ContractState (neo-project#1400)

* Fix dotnet-format (neo-project#1443)

* Add Salt and NEP2 to db3 wallet (neo-project#1444)

* NEP2

* Clean code

* Use MasterKey as passphrase

* Add Salt

* Unique Scrypt for all wallets

* Clean using

* Clean parameters

* Fix UT

* Random Salt

* fix ToStackItem issue (neo-project#1427)

* Allow MultiSig contracts in Wallet.Sign method (neo-project#1451)

* Allow to sign multisignature account if you have some of them

* Update IsMultiSigContract()

* Fixes UT

* Check null

* Update Wallet.cs

* Change if

Co-authored-by: Erik Zhang <erik@neo.org>

* update neo-vm version (neo-project#1456)

* Remove parallel verification (neo-project#1429)

* cast M to double (neo-project#1465)

* Read Fixed (neo-project#1454)

* Read Fixed

* format

* Rename

* Fix Consensus UT

* Add ut, and allow buffered streams

* Add ut, and allow buffered streams

* Change name

* Update Helper.cs

Co-authored-by: erikzhang <erik@neo.org>

* Adjust the Charge for Storage Writting (neo-project#1441)

* fix BigInteger0 storage outputs null  (neo-project#1471)

* Fix bug in contract update/destory (neo-project#1483)

* first commit

* format

* commit again

* format

* Burn sys_fee (neo-project#1430)

* Replace THROWIFNOT by ASSERT (neo-project#1475)

* Fix change password (neo-project#1490)

* Optimize the wallet UT (neo-project#1496)

* Limit the max height for some SYSCALLs (neo-project#1494)

* Send RelayResult to event stream (neo-project#1495)

* Add GasLeft syscall (neo-project#1509)

* Update akka to 1.4.2 (neo-project#1466)

* Optimize wallet tests (neo-project#1499)

* Optimize the wallet UT

* Optimize wallet UT test

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>

* rename bytearray to bytestring (neo-project#1524)

* rename bytearray to bytestring

* update dependency

* Support changing password for nep6 wallet (neo-project#1504)

* Remove UT_Culture (neo-project#1529)

* Optimize the wallet UT

* Optimize wallet UT test

* Test 2 culture

* Code optimization

* Delete UT_Culture

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>

* remove round up sysfee (neo-project#1522)

* Enable converting between public keys, script hashes and address (neo-project#1428)

* Enable converting between public keys, script hashes and address

* Add test cases

* Code optimization

* Fee adjusting

* Code optimization

* Add comment

* Code optimization

* Code optimization

* Merge from master

* Update InteropService.Contract.cs

* Code optimization

* Add wrong public key test cases

* Kick off new test

* format changing

* Code optimization

* Add comment

Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Fix SYSCALLs (neo-project#1511)

* Combine RemoteNode and ProtocolHandler (neo-project#1520)

* Fix akka warning (neo-project#1533)

* Tell RelayResult to the sender (neo-project#1548)

* Add abstract method Wallet.ChangePassword() (neo-project#1552)

* Network dependant signature (neo-project#1550)

* 3.0.0-preview2

* Vote for committee (neo-project#1491)

* Fix version

* Modify manifest according to the last amendment of NEP-3 (neo-project#1481)

* Sync try-catch opcodes (neo-project#1565)

* Fix plugin configuration falure (neo-project#1564)

* Add StackItem.ToJson() (neo-project#1569)

* Call _initialize() automatically (neo-project#1572)

* Remove grouping (neo-project#1566)

* Add GetCallFlags (neo-project#1587)

* Fix CallFlags (neo-project#1589)

* Simplify access to storage for native contracts. (neo-project#1583)

* Cache most recent block (neo-project#1592)

* Add StateLess to CallFlags (neo-project#1549)

* Add standard cryptography primitives (neo-project#1419)

* Datacache correction (neo-project#1611)

* Fix LocalNode (neo-project#1616)

* Remove ProtocolSettings Initialize

* Revert "Remove ProtocolSettings Initialize"

This reverts commit 58dda0b.

* Avoid calling ProtocolSettings.Default in multiple threads

Co-authored-by: Jin Qiao <jinqiao@neo.org>

* Update neo-vm package (neo-project#1624)

* Update neo.csproj

* Update all nugets

* Unify akka logs with neo logs (neo-project#1623)

* Unify akka logs

* Add event

* dotnet format

* Remove event

* Remove overload

* Clean changes

* Fix compilation error

* Simplify Logger

Co-authored-by: erikzhang <erik@neo.org>

* Remove FromJson (neo-project#1625)

* Unify unhandled exceptions (neo-project#1626)

* Core handle errors

* Unify UnhandledExceptions

* Remove empty line

* Move to NeoSystem

* Update NeoSystem.cs

* Allow log objects

* Change the source of UnhandledException

Co-authored-by: Erik Zhang <erik@neo.org>

* Make NEP6Wallet.path public (neo-project#1627)

* wallet-backup

* make path public

* case

* Abstract Path

* Improve

* Revert UT

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Add a change list to optimize datacache commit (neo-project#1619)

* Move cosigners to transaction attributes (neo-project#1620)

* First draft

* Remove dictonary

* Move json methods

* format

* Fix UT

* Fix Size

* clean code

* Fix UT

* Clean code

* Remove const

* Remove blank line

* Pluralize

* Allow multiple attributes of the same type

* Update src/neo/Wallets/Wallet.cs

* Fix some UT

* Fix UT

* Fix UT

* Update src/neo/Network/P2P/Payloads/CosignerAttribute.cs

Co-authored-by: Erik Zhang <erik@neo.org>

* Singular

* Move Cosigner to TransactionCollection

* Optimize empty

* Use ReflectionCache

* Change json format

* Rename

* Remove FromJson

* Optimize TransactionAttribute.ToJson()

* Rename

* Refactor

* Change the value of TransactionAttributeType.Cosigner

* Fix UTs

* Fix attribute order

* Remove TransactionAttributeCollection

* Reorder

* Revert some changes

* Revert some changes

Co-authored-by: Erik Zhang <erik@neo.org>

* Fix VerifyWitness (neo-project#1628)

* Modify iterators to public (neo-project#1639)

* modify iterators

* fix

* fix

* fix

* Revert "Improve gap calculation"

This reverts commit 9fa04a4.

* Revert "Revert "Improve gap calculation""

This reverts commit e920732.

* Use config from current working dir (neo-project#1622)

* Use config from current dir

* Search in multiple places

* Make Plugin.Path be virtual

* Not found command (neo-project#1645)

* Not found command

* Remove unused method

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>

* Subscribe to RelayResult messages in ConsensusService (neo-project#1647)

* Create only one snapshot for persist (neo-project#1602)

* Remove OnPersistCompleted()

* Optimize Blockchain.cs

* Move namespace

* Decouple NativeContract from InteropService. (neo-project#1649)

* Optimize the `GetPrice()` mechanism of SYSCALLs (neo-project#1650)

* fix the way to get the directory path of assembly (neo-project#1656)

* Ask for mempool after sync (neo-project#1544)

* Query mempool if I have less tx than the remote node

* Revert some changes

* Wait for verack

* Clean file

* Move to verack

* Wait for block sync

* Clean changes

* Only accept one mempool message per remote node

* Remove one variable

* Revert "Only accept one mempool message per remote node"

This reverts commit 359a3bb.

* Optimize

* Check it in TaskManager

* Update src/neo/Network/P2P/TaskSession.cs

Co-authored-by: Luchuan <luchuan@neo.org>

* Revert

* fix MemPoolTaskHash (neo-project#1660)

* Fix ms bug

* private

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: Erik Zhang <erik@neo.org>

* Remove CommitteeMembersCount and ValidatorsCount from Blockchain.cs

* Fix policy check (neo-project#1668)

* fix policy check

* Rename

* Fix GetCommitteeAddress()

Co-authored-by: erikzhang <erik@neo.org>

* Inventory message stream optimization (neo-project#1667)

* Rename

* Refactor InteropService (neo-project#1655)

* Optimize TransactionAttribute (neo-project#1674)

* Add MPT (neo-project#1442)

* Fix DataCache.Find (neo-project#1673)

* GetBlocks by block index (neo-project#1397)

* add description field (neo-project#1678)

* Fix duplicate connection (neo-project#1685)

* fix duplicate connection

* fix comments

* Rename to AllowNewConnection

* fix

* Fix comment

* fix

* Rename

* Remove useless check

* Update

* Update LocalNode.cs

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: erikzhang <erik@neo.org>

* Check the parameters count (neo-project#1695)

* Add RIPMED60 to syscall in ApplicationEngine.Crypto (neo-project#1694)

* Add Hash160 and Hash256 to syscall

* remove unnecessary reference

* format fix

* provide RIPMED160 instead of Hash256 and Hash160
Add RIPMED160 UT

Co-authored-by: Erik Zhang <erik@neo.org>

* Refactor NativeContract (neo-project#1693)

* Close neo-project#1696

* Add MaxBlockSystemFee (neo-project#1689)

* add max block system fee

* fix tx

* fix and add more ut

* format

* optimze code

* Reset maxblocksystem = 9000/GAS

* Update src/neo/SmartContract/Native/PolicyContract.cs

Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>

* Remove new line in log

* Update ConsensusService.cs

* up Prefix_MaxBlockSize as skiptable.insert

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>

* Add event name to System.Runtime.Notify() (neo-project#1701)

* Check return value of contracts (neo-project#1680)

* Check Json.Serialize map keys (neo-project#1705)

* Always return a value for public methods (neo-project#1706)

* Update to Neo.VM.3.0.0-CI00226 (neo-project#1713)

* Create callback (neo-project#1629)

* Merge

* Invoke callback

* dotnet-format

* Change UT for two args

* callbacks

* Syscall callback UT

* rename

* Rename

* Clean

* Clean again :P

* Rename

* Fix CurrentContext scope

* Rename

* abstract class

* Erik's feedback

* change ut

* fix ut

* Move to new namespace

* Move callback logic to ApplicationEngine

* Add TODO

* We don't need to check the CallFlags

* Remove RaiseLoadContext() and RaiseOnSysCall()

* Fix UT

* Add MethodCallback

* Update neo.csproj

* Fix compile

* Don't need to check the return value any more.

* Add AllowCallback to InteropDescriptor

* Modify the prices

* Fix

Co-authored-by: erikzhang <erik@neo.org>

* Add StrictUTF8 (neo-project#1710)

* Restrict notifications (neo-project#1708)

* fix storage fee

* fix

* Optimize

* Fix

* Real Fi

* apply

* Correct the formula

* fix ut

Co-authored-by: Igor Machado Coelho <igor.machado@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: zhangtao <ztgoforit@163.com>
Co-authored-by: Charis Zhao <eryeer@163.com>
Co-authored-by: belane <belane@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Yongjie Ma <20391402+yongjiema@users.noreply.github.com>
Co-authored-by: Ricardo Prado <38396062+lock9@users.noreply.github.com>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>
Co-authored-by: Erik van den Brink <git@erikvandenbrink.com>
Co-authored-by: Qiao-Jin <43407364+Qiao-Jin@users.noreply.github.com>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: doubiliu <liumengyu@neo.org>
Co-authored-by: ShawnYun <42930111+ShawnYun@users.noreply.github.com>
Co-authored-by: joeqian <qianzhuo@ngd.neo.org>
Co-authored-by: cn1010 <1062108372@qq.com>
Co-authored-by: John <johnkellyoxford@gmail.com>
Co-authored-by: doubiliu <liumengyu@ngd.neo.org>
Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: cn1010 <baoting@onchain.com>
Co-authored-by: lichen <48947753+Lichen9618@users.noreply.github.com>
Co-authored-by: HaoqiangZhang <gripzhang@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Changes that may affect performance, usability or add new features to existing modules. p2p Module - peer-to-peer message exchange and network optimisations, at TCP or UDP level (not HTTP).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consensus node stop sync block.
9 participants