-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Network protocol suggestion: getfullblocks #522
Comments
I think I agree @ixje, I already openned PR related to some small points you mentioned. In a first read I had a good fell about the compilation you did and looks correct. Lets move towards these improvements. |
The part of allowing query data with start a finish is kind of already implemented but not used. |
This design makes sense, let me explain. Suppose there are 4 nodes A, B, C, and D. Node A requests blocks 100~200 from the other 3 nodes. So he will send:
The problem here is that node A does not know if other nodes have these blocks, so it must send Then Node B reply the message:
Node B has only blocks of 100 to 150 height. Node C reply the message:
Node C has all the blocks. Node D says nothing because he is the new one here too. Then Node A send messages to B and C:
This way it can download blocks from multiple nodes at the same time. If there are no |
Erik, I understand your example. It does however assume that all clients request data from multiple nodes simultaneously. I found that syncing from 1 good node is superior to syncing from multiple nodes that can vary in quality/response times. So a different design can be a SyncManager that uses just 1 node for requesting all the data. Then a NodeManager can track peer health and make sure SyncManager always uses the best available known peer (because peer quality can deteriorate over time). In my observations of last weeks I found that really good nodes tend to reply with actual data < 0.2s. Good nodes average around < 0.8s, and medium/poor < 2s. Everything above I considered a bad node. Ultimately, block download speed will always be faster than block processing speed once the number of transactions increases. Regarding knowing what blocks a node has; when we connect to a node we can get this information from the
Of course this has its limitations at some point. However, the current logic of getblocks already allows you to just give a start_hash and it will never give you more data than it has (up to a limit of 500). We can replicate that with the getfullblocks command.
|
I also observed that there is nothing to rank node health currently and there probably should be some ranking. However, it is important that the network not be designed to create a situation where all nodes hammer the most powerful node in the network. Higher powered nodes may have reasons to be higher powered besides wanting to bear a heavier burden of serving all other nodes in the network. |
I don't think it is possible to prevent this anyway unless you're going to use some central arbiter to control it (which doesn't sound good). In the current 4-step design a client can already apply the same strategy of selecting the best nodes (according to his/her criteria). Note that "best node" is partially region dependent. A European/American peer will unlikely ever select an Asian hosted node as the fastest performing node, simply based on network latency alone. |
It is certainly possibly to write code that spreads out the network load and prevents nodes hammering the same host if they are running the Neo core. The current code certainly doesn’t generally cause hammering the host with lowest network latency and it doesn’t use any central arbiter. While anyone can attack a publicly facing node, the networking protocol of nodes running the official client should not exhibit such behavior. That being said I do think the protocol should try to do some things to optimize connecting to lower latency nodes and probably keep some metric of node health. Having requests nearly always routed to the lowest latency node to which one is currently connected might work nicely for your one client, but is likely to cause problems if all nodes were running such a client. |
I don't really see why that would cause big problems. e.g. East-Asian nodes will never get a lower network latency to nodes on other continents than to their 'domestic' ones. This holds true for nodes on all continents. Within your continent you will not at all times know the addresses of all available nodes, which is one possible reason why you won't all hit the same node. If the best node gets overloaded it will either hit its max connected peers, or its performance will degrade to the point it's no longer considered best then nodes will move on to another host. This results in spread and performance can restore on the node that degraded. The former does assume that we do not just look at network latency, but also at actual data response/request latency. To elaborate what I mean with that; a node can have a low network latency but at the same time queue all your messages (or even dropping them) so having a poor "data request/response latency". It's the latter that matters most imo, not the former. This is not just theoretical, the NGD nodes are a real life example of this. My network latency to those |
Hi, @erikzhang, by reading your explanation I agree with your design and it makes sense to me. On the other hand, I fell that we need some minor adjustments on the |
@ixje I agree that measuring network latency and entire "data request request/response" latency and keeping track of these per remote node can help optimizing the network and potentially protecting against bad actors. Recently, to prevent waiting too long for block data, there was the change that allows the block to be requested from up to 3 remote nodes. If we knew more about the health (average network and data latencies) of the nodes from which blocks are requested, we could weight down talking to unhealthy nodes and have better confidence with using less redundancy. That would require a number of changes to Currently the first to respond with block hashes are the ones that get the task to return block data. This already should have the effect somewhat of having nodes with lower latency serve requests; however, responding to |
@jsolman I think we're on the same line here 👍 . The only difference is that you seem to talk from the |
with this last bug fix #524 the network reached another level of stability! I suggest that we do not modify anything right now. |
@vncoelho I do not consider the issue you mentioned as directly related to this one. That one was a client specific issue (and good that it is solved), but this |
@ixje I agree that it is different. What I mean is that the network is behaving smoothly and, in this sense, novel strategies should be analyzed with careful. |
@ixje I thought I'd point out that the full block can be retrieved today from RPC nodes by passing the block number to the 'getblock' method. This isn't part of the normal network protocol since it isn't really that useful since nodes need to know who has a block first before getting it, and the nodes use a push mechanism of letting each other know when they have blocks rather than a pull mechanism of asking other nodes if they have block 'x'. Also, since nodes usually get headers first they already also know all the block hashes when syncing, so they can call 'getdata' directly with the block hash if they want to get block data in 1 call. Therefore the proposal of the additional command would not really not help anything for the normal network protocol, and for RPC the method already exists. To be clear; once synced, in normal operation, nodes broadcast inv as soon as they persist a block. This allows the receiving nodes to know they can immediately ask for data for the new block. So there is no 4-step process in normal operation -- it is just 2 steps.
That being said, what I discussed earlier about keeping track of health of nodes (latency, availability, etc. should probably have a separate issue opened for it) |
I think we can close this and prefer to take up what could be most useful from this discussion on #542 that I have opened. |
I have to say I disagree with your opinion that it is not useful as part of the normal network protocol. First, as pointed out before you know what blocks a node has by the Second, If I would want to sync from zero with the proposed solution I would;
The proposal is not necessarily asking for replacement, but for opening up to alternative designs from the C# project.
This is an assumption probably based on how Given the above I disagree with the closing of this issue. Your new issue only keeps improvements to the C# project in mind. Having said that, I actually think we need a neutral discussion place where we can propose NEO ideas/solutions. This issue tracker is bound to the C# project and that seems to automatically push peoples thinking to be within the boundaries of the C# project instead of to the vision of the NEO project (I've seen this multiple times now). Let me know if I somewhere missed that the vision has become that the whole world will just have to interface with some C# clients. In that case I'll simply withdraw. |
Why can’t other projects also sync headers? |
@ixje I understand your frustration and don’t want you to feel like I’m not being neutral about the issue. Let’s leave the issue open and get more people’s opinions. I do think getting headers first is probably a better design in general. For instance, it makes it less likely to get the wrong block at a height. Anyway, it would be easy to add support for what you are asking. @erikzhang what do you think about supporting a message in the core protocol that will return the block data given the block height for alternative implementations to use? |
It's not that they can't, it's that they not always have a need for it. Not every node is interested in also sharing headers/blocks on the network. The most obvious example being a tracker like neo-scan/neotracker. A statistics website might just want to collect data, not share. Enabling sharing of data also increases the load on the host, which might not be interested in that. Is it the best for the network? Arguably not. But it is possible and there are legitimate reasons for it, so people will do it.
Can you elaborate why it would be less likely to get the wrong block? The first thing that comes to mind is that recently many testnet clients were stuck on a faulty block |
It can use the RPC call |
I have a change that never gets stuck when syncing headers first. The only reason they got stuck is because they accepted headers when the last header was the stuck block due to the issue where two blocks can get created at the same height. If you sync headers and never save the last header received you will never get stuck. I run code that does this on my nodes and they don’t get stuck now. |
I should note though that the two block created at same height will be fixed anyway soon when the commit phase consensus change goes in. |
That's a (valid) work around, but is that really what you want? Now you have to host a C# node just so you can call some RPC method in a reliable way.
I lost you there. Are you perhaps on NEO discord and willing to discuss it shortly? I have the same user name there. |
* 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 ¯\_(ツ)_/¯
* 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 <[email protected]> * 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)
…ect#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 ¯\_(ツ)_/¯
…ect#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 ¯\_(ツ)_/¯
* 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Update src/neo/SmartContract/Manifest/ContractManifest.cs Co-Authored-By: Erik Zhang <[email protected]> * 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 <[email protected]> * Update MerkleBlockPayload.cs Co-authored-by: Erik Zhang <[email protected]> * 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 <[email protected]> * Adding some comments to datacache (#1347) * Adding some comments to datacache * Adding Exception comment tip of @Tommo-L Co-authored-by: Shargon <[email protected]> * 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 <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Erik Zhang <[email protected]> Co-authored-by: Shargon <[email protected]> * Allow to verify import blocks (#1415) * Verify Import * Default true * Fix notifications (#1422) Co-authored-by: Vitor Nazário Coelho <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Jin Qiao <[email protected]> * 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 <[email protected]> Co-authored-by: Jin Qiao <[email protected]> * 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 <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Make NEP6Wallet.path public (#1627) * wallet-backup * make path public * case * Abstract Path * Improve * Revert UT Co-authored-by: Shargon <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Revert * fix MemPoolTaskHash (#1660) * Fix ms bug * private Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Luchuan <[email protected]> Co-authored-by: Erik Zhang <[email protected]> * Remove CommitteeMembersCount and ValidatorsCount from Blockchain.cs * Fix policy check (#1668) * fix policy check * Rename * Fix GetCommitteeAddress() Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Remove new line in log * Update ConsensusService.cs * up Prefix_MaxBlockSize as skiptable.insert Co-authored-by: Shargon <[email protected]> Co-authored-by: HaoqiangZhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Erik Zhang <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: zhangtao <[email protected]> Co-authored-by: Charis Zhao <[email protected]> Co-authored-by: belane <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Yongjie Ma <[email protected]> Co-authored-by: Ricardo Prado <[email protected]> Co-authored-by: cloud8little <[email protected]> Co-authored-by: Krain Chen <[email protected]> Co-authored-by: Erik van den Brink <[email protected]> Co-authored-by: Qiao-Jin <[email protected]> Co-authored-by: Luchuan <[email protected]> Co-authored-by: doubiliu <[email protected]> Co-authored-by: ShawnYun <[email protected]> Co-authored-by: joeqian <[email protected]> Co-authored-by: cn1010 <[email protected]> Co-authored-by: John <[email protected]> Co-authored-by: doubiliu <[email protected]> Co-authored-by: Jin Qiao <[email protected]> Co-authored-by: cn1010 <[email protected]> Co-authored-by: lichen <[email protected]> Co-authored-by: HaoqiangZhang <[email protected]>
* 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Update src/neo/SmartContract/Manifest/ContractManifest.cs Co-Authored-By: Erik Zhang <[email protected]> * 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 <[email protected]> * Update MerkleBlockPayload.cs Co-authored-by: Erik Zhang <[email protected]> * 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 <[email protected]> * Adding some comments to datacache (neo-project#1347) * Adding some comments to datacache * Adding Exception comment tip of @Tommo-L Co-authored-by: Shargon <[email protected]> * 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 <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Erik Zhang <[email protected]> Co-authored-by: Shargon <[email protected]> * Allow to verify import blocks (neo-project#1415) * Verify Import * Default true * Fix notifications (neo-project#1422) Co-authored-by: Vitor Nazário Coelho <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Jin Qiao <[email protected]> * 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 <[email protected]> Co-authored-by: Jin Qiao <[email protected]> * 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 <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Make NEP6Wallet.path public (neo-project#1627) * wallet-backup * make path public * case * Abstract Path * Improve * Revert UT Co-authored-by: Shargon <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Revert * fix MemPoolTaskHash (neo-project#1660) * Fix ms bug * private Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Luchuan <[email protected]> Co-authored-by: Erik Zhang <[email protected]> * Remove CommitteeMembersCount and ValidatorsCount from Blockchain.cs * Fix policy check (neo-project#1668) * fix policy check * Rename * Fix GetCommitteeAddress() Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Remove new line in log * Update ConsensusService.cs * up Prefix_MaxBlockSize as skiptable.insert Co-authored-by: Shargon <[email protected]> Co-authored-by: HaoqiangZhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Erik Zhang <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: zhangtao <[email protected]> Co-authored-by: Charis Zhao <[email protected]> Co-authored-by: belane <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Yongjie Ma <[email protected]> Co-authored-by: Ricardo Prado <[email protected]> Co-authored-by: cloud8little <[email protected]> Co-authored-by: Krain Chen <[email protected]> Co-authored-by: Erik van den Brink <[email protected]> Co-authored-by: Qiao-Jin <[email protected]> Co-authored-by: Luchuan <[email protected]> Co-authored-by: doubiliu <[email protected]> Co-authored-by: ShawnYun <[email protected]> Co-authored-by: joeqian <[email protected]> Co-authored-by: cn1010 <[email protected]> Co-authored-by: John <[email protected]> Co-authored-by: doubiliu <[email protected]> Co-authored-by: Jin Qiao <[email protected]> Co-authored-by: cn1010 <[email protected]> Co-authored-by: lichen <[email protected]> Co-authored-by: HaoqiangZhang <[email protected]>
* 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Update src/neo/SmartContract/Manifest/ContractManifest.cs Co-Authored-By: Erik Zhang <[email protected]> * 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 <[email protected]> * Update MerkleBlockPayload.cs Co-authored-by: Erik Zhang <[email protected]> * 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 <[email protected]> * Adding some comments to datacache (neo-project#1347) * Adding some comments to datacache * Adding Exception comment tip of @Tommo-L Co-authored-by: Shargon <[email protected]> * 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 <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Erik Zhang <[email protected]> Co-authored-by: Shargon <[email protected]> * Allow to verify import blocks (neo-project#1415) * Verify Import * Default true * Fix notifications (neo-project#1422) Co-authored-by: Vitor Nazário Coelho <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Jin Qiao <[email protected]> * 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 <[email protected]> Co-authored-by: Jin Qiao <[email protected]> * 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 <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Make NEP6Wallet.path public (neo-project#1627) * wallet-backup * make path public * case * Abstract Path * Improve * Revert UT Co-authored-by: Shargon <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Revert * fix MemPoolTaskHash (neo-project#1660) * Fix ms bug * private Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Luchuan <[email protected]> Co-authored-by: Erik Zhang <[email protected]> * Remove CommitteeMembersCount and ValidatorsCount from Blockchain.cs * Fix policy check (neo-project#1668) * fix policy check * Rename * Fix GetCommitteeAddress() Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> Co-authored-by: erikzhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Remove new line in log * Update ConsensusService.cs * up Prefix_MaxBlockSize as skiptable.insert Co-authored-by: Shargon <[email protected]> Co-authored-by: HaoqiangZhang <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Erik Zhang <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: zhangtao <[email protected]> Co-authored-by: Charis Zhao <[email protected]> Co-authored-by: belane <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Yongjie Ma <[email protected]> Co-authored-by: Ricardo Prado <[email protected]> Co-authored-by: cloud8little <[email protected]> Co-authored-by: Krain Chen <[email protected]> Co-authored-by: Erik van den Brink <[email protected]> Co-authored-by: Qiao-Jin <[email protected]> Co-authored-by: Luchuan <[email protected]> Co-authored-by: doubiliu <[email protected]> Co-authored-by: ShawnYun <[email protected]> Co-authored-by: joeqian <[email protected]> Co-authored-by: cn1010 <[email protected]> Co-authored-by: John <[email protected]> Co-authored-by: doubiliu <[email protected]> Co-authored-by: Jin Qiao <[email protected]> Co-authored-by: cn1010 <[email protected]> Co-authored-by: lichen <[email protected]> Co-authored-by: HaoqiangZhang <[email protected]>
There are some improvements proposed in #366
I'd like to discuss one more that is also backwards compatible.
The current
getblocks
command is inefficient and also has a misleading name. The name suggests you will receiveblocks
. In reality you get hashes (via aninv
message). You then basically repackage the same information of thisinv
message but now with thegetdata
command to finally receive theblocks
messages. This is a 4-step process:getblocks
inv
with hash listgetdata
with the received hash listblock
(for all requested hashes)We can do the same process in just 2-steps.
Proposal
I'd like to propose a
getfullblocks
command (or something along those lines) that will do the above in 2 steps (specifically only step 1 & 4). This is nearly identical to the currentgetblocks
but instead of sending aninv
it will instantly return the requested blocks.Untested example, but should be close enough to explain the idea
The above is basically a combination of
OnGetBlocksMessageReceived()
andOnGetDataMessageReceived()
Benefits
Possible improvements
allow querying data using a
start_index
,stop_index
. This would mean we cannot re-use theGetBlocksPayload
but requires a new one.Benefits of these parameters are;
getfullblock
message, as you do not need anyUInt256
hashes to start requesting data, just anint
for the indexinv
payload structure for deserialising a hash that was broadcasted on the network. You can skip all unnecessary data and just go straight to retrieving blocks.The text was updated successfully, but these errors were encountered: