Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

RpcNep5Tracker: Handle NEP5 transfers to/from null & limit max results #71

Merged
merged 10 commits into from Apr 9, 2019

Conversation

jsolman
Copy link
Contributor

@jsolman jsolman commented Mar 22, 2019

Minted NEP5 tokens are sometimes sent from null. Also some contracts destroy tokens sending to null. These changes should handle tracking their balances.

This adds support to the RpcNep5Tracker plugin for: neo-project/proposals#44

Also, while not a standard, at least one popular NEP5 token used a mintTokens event to track minting of its tokens. This adds support for it in order to track balances of the known currently in use NEP5 tokens.

Warning: Currently this code needs testing

@jsolman jsolman requested a review from erikzhang March 22, 2019 07:50
@jsolman
Copy link
Contributor Author

jsolman commented Mar 22, 2019

@apisit I added the support you wanted for mintTokens. Please test and let me know if this is working for you.

@jsolman
Copy link
Contributor Author

jsolman commented Mar 22, 2019

I'm syncing TestNet with these changes now.

@jsolman jsolman changed the title RpcNep5Tracker: Handle NEP5 transfers to/from null. RpcNep5Tracker: Handle NEP5 transfers to/from null & limit max results Mar 22, 2019
@jsolman
Copy link
Contributor Author

jsolman commented Mar 22, 2019

Actually, maybe I should make it configurable whether to record history for the null address. Some people might want it. Since it allows to look and see all addresses that burned tokens between a particular time period or to look and see all tokens minted between a certain time period.

@jsolman
Copy link
Contributor Author

jsolman commented Mar 22, 2019

It should be robust now.

@jsolman
Copy link
Contributor Author

jsolman commented Mar 23, 2019

Syncing MainNet now.

@erikzhang
Copy link
Member

https://github.com/neo-project/proposals/blob/master/nep-5.mediawiki#events

In NEP-5 specification:

A token contract which creates new tokens MUST trigger a transfer event with the from address set to null when tokens are created.
A token contract which burns tokens MUST trigger a transfer event with the to address set to null when tokens are burned.

null address is a part of NEP-5 standard, so I think you needn't make it configurable.

@apisit
Copy link

apisit commented Mar 23, 2019

finished syncing MainNet.
Tested checking both ASA and LX. triggering by event transfer(null,...) and mintTokens() work as expected. token show up in addresses
Thanks @jsolman

@jsolman
Copy link
Contributor Author

jsolman commented Mar 23, 2019

null address is part of NEP-5 standard, so I think you needn't make it configurable.

The only thing that is configurable is whether to index the transfer history for the UInt160.Zero address. It still tracks transfers minted to addresses or destroyed from addresses with the RecordNullAddressHistory flag turned off. That means people can still see the history for their address when tokens were sent to them from null or when they sent tokens to null. Most people wouldn’t need the feature of seeing history of the null address itself, but turning this feature on allows querying to see all tokens minted or destroyed by anyone during a particular time range.

So I have turned it off by default, but if someone wants to be able to query for that information they could turn it on. Most light wallet clients wouldn’t need this turned on, since they only need to check transfer history for specific wallet addresses.

// Event name should be encoded as a byte array.
if (!(stateItems[0] is VM.Types.ByteArray)) return;
var eventName = Encoding.UTF8.GetString(stateItems[0].GetByteArray());

// Only care about transfers
if (eventName == "mintTokens")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@erikzhang LX is the only MainNet NEP5 token using this non-standard method I think and they are going to contract migrate their NEP5 token; I could just remove handling this. What do you think?

Also if a NEP5 token uses contract migrate it is problematic for this plugin. Maybe it could detect contract migrate of NEP5 tokens and migrate all the balances in leveldb, but it is not at all efficient.

Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove this first. As for contract migrate, can we detect it? Maybe future token contracts should use dynamic calls to prevent changes to the hash when upgrading the contract.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can we detect it?

We probably could detect it; however, migrating all the balance key space in one block is definitely not a good design and also could be a potential DDOS vector.

Maybe future token contracts should use dynamic calls to prevent changes to the hash when upgrading the contract.

I think it is a great idea to suggest the use of dynamic calls for a contract that may need upgrade so that the NEP5 contract hash would remain the same if contract logic needs to change. We should recommend this as a best practice for contract owners. However, it would be hard to enforce such a thing.

We should give guidance that NEP5 tokens should never have their hash changed; doing so requires an airdrop of their new token to existing holders, because balances will not be tracked by just migrating storage. Alternatively, we should give guidance to contract owners that if they have a NEP5 contract and think they may need to upgrade it's logic in the future using migrate, they should write dynamic invoke with logic in another contract as you suggest so that they prevent changes to the hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can remove this first.

I switched it to a config option, and disabled it by default.

Copy link
Member

Choose a reason for hiding this comment

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

We probably could detect it; however, migrating all the balance key space in one block is definitely not a good design and also could be a potential DDOS vector.

Yes, I also thought about this issue. Maybe we should open an issue separately to discuss the solution to this problem. What I can think of right now is not to do a storage migration when upgrading the contract, but to add a redirect record.

@erikzhang
Copy link
Member

@jsolman Are you going to work on detecting contract migrate? Or not?

@jsolman
Copy link
Contributor Author

jsolman commented Apr 8, 2019

@erikzhang I will definitely not add support for NEP5 contract migration in this PR. Also, I don’t have any plan to work on that feature any time soon. If you have a good idea on how to support it with a redirect record maybe you can take the time to implement it after merging this.

@@ -30,16 +30,22 @@ public class RpcNep5Tracker : Plugin, IPersistencePlugin, IRpcPlugin
private DataCache<Nep5TransferKey, Nep5Transfer> _transfersReceived;
private WriteBatch _writeBatch;
private bool _shouldTrackHistory;
private bool _recordNullAddressHistory;
private uint _maxResults;
private bool _shouldTrackNonStandardMintTokensEvent;
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be added to config.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no necessity to add it. It will default to false.

@jsolman jsolman merged commit f4b83e0 into master Apr 9, 2019
@superboyiii
Copy link
Member

superboyiii commented May 9, 2019

@jsolman I made a test for NEP5Tracker on mainnet yesterday. getnep5balances worked well as expected, but getnep5transfers didn't work until I sync to the latest height. However, it works well on my privatenet. The only difference is the version of consensus. The mainnet is 2.9.4 and my privatenet is 2.10.2 preview3. So in order to prove that, we also applied it on testnet since the consensus version is 2.10.X. The result is the same as my privatenet. It worked as expected.

@erikzhang erikzhang deleted the HandleNep5NullTransfers branch May 9, 2019 03:00
@superboyiii
Copy link
Member

superboyiii commented May 9, 2019

For example, on mainnet, I choose a random address "AZsvkf5fopsUvfMbsHfx9qKmwswtgdsgZv" which has a transaction on height of "1768508".
The txid is "0f2896032f3ad8614ce50e87b0db17a028bba976d25715f517c9201de82ee7d5".
image
Then I use getnep5transfers to get all nep5 transaction history. But the result is like this.
image
Nothing is there.

@superboyiii superboyiii restored the HandleNep5NullTransfers branch May 9, 2019 03:26
@shargon shargon deleted the HandleNep5NullTransfers branch May 9, 2019 07:08
@jsolman
Copy link
Contributor Author

jsolman commented May 13, 2019

@superboyiii by default getnep5transfers only shows history for the last 7 days. You need to specify the parameter if you want further back history.

@superboyiii
Copy link
Member

Wow.....I see. Got it. Thanks for your explanation, Jeff.

@superboyiii
Copy link
Member

It works well as expected. Hahhhha.

chenzhitong pushed a commit to chenzhitong/neo-modules that referenced this pull request Oct 13, 2020
neo-project#71)

* Handle NEP5 transfers to/from null.
* Add support for tracking tokens using non-standard mintToken event.
* Implement maximum results to return for transfer history.
* Make whether to support tracking null address history configurable. Default to false.
* Better input validation
* Support tracking non-standard mintTokens event, but default to off.
chenzhitong pushed a commit to chenzhitong/neo-modules that referenced this pull request Nov 25, 2020
* add SimplePolicy

* add ApplicationLogs

* use leveldb in ApplicationLogs

* update dependency: Neo v3.0.0-preview2-04

Close #1

* Logging in millisecs

After change to Akka consensus in NEO 3.0, it's so fast that seconds do not mean much anymore.. now milliseconds is important to actually know of what is going on the consensus algorithm.

* remove break statement from FilterFree

* Fix Priority Fee Transactions being treated as Free (#4)

* add RpcDisabled

* add StatesDumper

* add ImportBlocks (#7)

* `yield break` when the height of the imported block reaches the limit

* detect recursive references in ApplicationLogs

* exporting blocks in plugin

* copy config.json to output directory automatically

* v2.9.0 (#9)

* fix SimplePolicyPlugin

* fix neo-project/neo#395

* Rpc Basic Auth (#14)

* Rpc Basic Auth

* change plugin name to RpcSecurity

* Including number of dumped states (#17)

* Including number of dumped states

* Update StatesDumper/StatesDumper.cs

Co-Authored-By: vncoelho <vncoelho@gmail.com>

* Readme (#18)

* misspelling (#26)

* Help for Plugins (#28)

* Transaction size plugin (#10)

* Update packages reference (#22)

* Basic unit test structure for SimplePolicyPlugin (#25)

* Persitence Plugin for exporting storage changes (#21)

* Persitence Plugin first draft

* Fixing some compiling problems. Trackable is still not found in the local scope.

* Minnor changes. Trackable still not found

* Fixing all compiling errors and Trackable

* Fixing StorageKey and Item get values

* Switch case Persist Action and fixing Storage export

* Adding Height To Being

* Moving plugin to StatesDumper

* minnor comments

* remove StatesDumper.sln

* format

* remove `Settings.BlockStorageCache`

* add `PersistActions`

* v2.9.3 (#31)

* Update packages reference

* Fix claim (#34)

* v2.9.4

* Expose the max TX per block and max low priority TX per block. (neo-project#37)

* Ensure PoW correct order for TXs tiebreakers (neo-project#38)

* Ensure PoW correct order for TXs tiebreakers

* ThenByAscending for Hash

* Expose HighPriorityTxType (neo-project#39)

* Expose HighPriorityTxType

* HigherLowPriorityTxTypes

* InHigherLowPriorityList

* Modify missing InHigherLowPriorityList

* Missing InHigherLowPriorityList

* Use InHigherLowPriorityList and change to public

* Clean

* Clean II

* Commit as the final step of persistence in StatesDumper (neo-project#40)

* Support commit as the final step of persistence.

* Update for new method .

* OnCommitStorage

* Adding tests and fixing typo (neo-project#41)

* Adding tests and fixing typo

* adding random attribute to claim

* unit tests for hash compare

* Creating Travis CI for neo-plugins (neo-project#42)

* Including PreProcess and PostProcess functions (neo-project#46)

* Including PreProcess and PostProcess functions

* Adding pre-post to RpcSecurity

* Fix missing public declaration (neo-project#48)

* Add RpcWallet (neo-project#44)

* Add RpcWallet

* Add `importprivkey`

* Add `from` parameter to `sendmany`

* Add `getunclaimedgas`

* Add `claimgas`

* Add reference: Neo 2.10.0

* Fix `importprivkey`

* Add plugin for NEP5 balances and transfer history (Persistence + RPC) (neo-project#43)

* Check authentication during pre-processing. (neo-project#54)

* v2.10.0

* Fix memory leak of LevelDB snapshots. (neo-project#57)

* Use IPersistencePlugin and batch Application Log writes. (neo-project#62)

* Fix sizes for RpcNep5Tracker (neo-project#67)

* Plugin CoreMetrics (neo-project#68)

* Plugin coreMetrics.

* Organize project files

* metric prefix

* Make calculation for extra gas on "send*" RPC (neo-project#70)

* Make calculation for extra gas on "send*" RPC

* Fix for the calculation when little overstep

* Add Max_Fee as the optional for gas limit. (neo-project#74)

* Make calculation for extra gas on "send*" RPC (neo-project#70)

* Make calculation for extra gas on "send*" RPC

* Fix for the calculation when little overstep

* Delete the dependency which is for testing purpose

* Choose the max_fee between  fee and extra_fee

* Change error codes

* Update Settings.cs

* format

* Add `NuGet.Config`

* fix size calculation (neo-project#75)

* Add Plugin for UTXO tracking by account. (neo-project#65)

* Add Plugin for UTXO tracking by account.

* Rename RpcSystemAssetPlugin -> RpcSystemAssetTracker.

* Accept address or script hash.

* Remove unnecessary white space.

* Update project ref to Neo 2.10.1-CI00002.

* Ensure consistency in case of crash or kill.

* Fix setting lastPersistedBlock after each block is persisted.

* Performance optimization: Don't write block number for empty blocks.

* Optimize.

* Add support for tracking unclaimed spent outputs.

* Provide getclaimable RPC call for getting available claim spent outputs.

* Clean-up.

* Don't leak memory.

* Implement getclaimable to get get total unclaimed amount for an address.

* Remove unnecessary comment.

* Fix size of UserSystemAssetCoinOutputs. Remove unused using statement.

* Reload max utxo's from configuration if it changes.

* Upgrade dependency

* Fix .sln for neo-project#65

* Updating Readme information (neo-project#76)

* Fixes `ImportBlocks` for Neo 2.10.1 (neo-project#78)

* v2.10.1

* Properly stop importing blocks on system shutdown. (neo-project#66)

* RpcNep5Tracker: Handle NEP5 transfers to/from null & limit max results (neo-project#71)

* Handle NEP5 transfers to/from null.
* Add support for tracking tokens using non-standard mintToken event.
* Implement maximum results to return for transfer history.
* Make whether to support tracking null address history configurable. Default to false.
* Better input validation
* Support tracking non-standard mintTokens event, but default to off.

* Small optimization (neo-project#82)

* Updating travis (neo-project#84)

* Fix output json for multisigaddress transaction (neo-project#86)

* Fix output json for multisigaddress transaction 

Fix output json for multisigaddress transaction

* format

* format

* Fix the height to end with (neo-project#88)

* Fix-heightToEnd

* Minor fix and comment

* Minor fix on storage state dumper parameter HeightToStartRealTimeSyncing (neo-project#91)

* Minor fix on storage state dumper parameter HeightToStartRealTimeSyncing

* Update StatesDumper/StatesDumper.cs

Co-Authored-By: vncoelho <vncoelho@gmail.com>

* Prevent exceed the height (neo-project#92)

* Update CoreMetrics.cs

I think that it could be exceeded the max height using the `lastHeight` parameter

* Update CoreMetrics.cs

* v2.10.2 (neo-project#96)

* Update CoreMetrics.cs (neo-project#94)

* Update dependency: Neo v3.0.0-CI00044 (neo-project#98)

* Updating README - Removing Asset Tracker plugin (neo-project#104)

Removing description of asset tracker plugin from NEO 3.0 plugins readme

* Prevent DoS with wrong files (neo-project#81)

* Prevent DoS with wrong files

* Constant

* Throw exception

* Clean

* Fixing uint to ulong for some plugins due to seconds to ms change (neo-project#107)

* Fixing uint to ulong for some plugins

* Removing .sln files

* Updating nuget to more recent daily build

* Removing SimplePolicy plugin (neo-project#110)

* Clean SimplePolicy

* Removing travis

* Completely removing SimplePolicy

* Updating readme

* Re-adding travis

* Dotnet restore on Travis

* Cleaning .sln

* Cleaning SP-UT

* SystemLog plugin (neo-project#117)

* CI00151 (neo-project#111)

* Remove `mintTokens` from RpcNep5Tracker

* Fixes deadlock in RpcNep5Tracker (neo-project#128)

* Updating README with RPC Wallet and SystemLog (neo-project#126)

* Fix RpcNep5Tracker (neo-project#125)

* Fixes output of `getbalance` (neo-project#132)

* Fix/memory (neo-project#135)

* use Singleton.Store.GetBlock optimize memory cause

* refactor

* v3.0.0-preview1 (neo-project#136)

* Update to v3.0.0-preview1

* update version number

* Fix cell on maxNBlocksPerDay (3.X) (neo-project#142)

* Fix cell on maxNBlocksPerDay

uint (86400/15000*10000) equals 5000 but not 5760 because ```maxNBlocksPerDay``` is uint but not float.

* Delete incoverable code

Delete incoverable code since unint can't be <0,. For example: uint(-1) = uint 4294967295.

* Fix nBlocks == 0

Fix nBlocks == 0

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

* Upgrade dependencies and target frameworks

* Update .travis.yml

* IStorage (neo-project#148)

* Fix UT (neo-project#149)

* Update RpcNep5Tracker/RpcNep5Tracker.cs

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

* Update RpcNep5Tracker/RpcNep5Tracker.cs

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

* Update RpcNep5Tracker/RpcNep5Tracker.cs

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

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

* Fix SystemLog

* Add LevelDBStore (neo-project#150)

* Neo v3.0.0-CI00817

* Fix leveldb (neo-project#153)

* Fix ApplicationLog (neo-project#154)

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

* RocksDb storage plugin (neo-project#144)

* RocksDb plugin

* Update IStoragePlugin.cs

* Clean name

* Refactor as IStore

* Remove Helper

* Reorder

* Remove IStorage

* Reduce sln changes

* sln bom

* Clean and optimize

* Update nuget

* Create and cache only families if are used

* Rename namespaces

* Rename classes

* 3.0 version

* Format

* Rename the directory

* SetSync

* Remove the DbOptions wrapper

* Update Options.cs

* Remove RocksDBCore

* Remove ColumnFamily.cs

* Rename RocksDbSnapshot to Snapshot

* Add config.json

* Update RocksDBStore.csproj

* Add storage UT

* Fix RocksDb

* Update dotnetcore.yml

* Update dotnetcore.yml

* Copy fix leveldb

* Remove test

* Remove comment

* Fix the fix

* Fix Clear method

* Some changes

* Fix sln

* Update dotnetcore.yml

* sudo apt

* add leveldb

* Update dotnetcore.yml

* Fix Dispose and add UT

* Clean using

* Optimize LevelDB init

* Move projects to src (neo-project#159)

* Remove ImportBlocks (neo-project#161)

* Update .sln

* Rename tests

* Add RpcClient (neo-project#163)

* Remove CoreMetrics (neo-project#164)

* Coveralls (neo-project#165)

* Add RpcServer (neo-project#160)

* Update README.md (neo-project#146)

* Update NuGet versions of all modules (neo-project#174)

* Update-package-rpc-client

* Update nuget

* Update Crypto.ECDsaVerify

* Update TransactionManager.cs

* Some fixes

* Change from public to protected as in level db (neo-project#177)

* Change from public to protected as in level db

* Update RocksDBStore.csproj

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

* Update neo nuget

* change network fee calculation (neo-project#178)

* change network fee calculation

* update to CI00847

* fix fee issue

* add UT for network fee

* Update versions

* Update src/RpcClient/TransactionManager.cs

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>

* Rpc limits (3x) (neo-project#172)

* Add some limits to rpc

* Updating to peer and comments

* Allow to configure MaxConcurrentConnections

* Enter

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

* update readme (neo-project#169)

* update readme

* more details for rpc-related plugins

* desc for plugin dependency

* add logo

* Improvement

Improvement

* Delete --log

Delete --log

* Format

Format

* Minor changes

* Adding note about NEP5 functionalities

* Updating with RpcServer

* Fix

Fix

* Format

Format

* Remove StorageEngine

Remove StorageEngine

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>

* dotnet-format (neo-project#185)

* Fix

* Fix

* Add dotnet format version

* Fix version

* Update main.yml

* Update main.yml

* Update main.yml

* Fix RpcServer[GetStorage] (neo-project#183)

* Fix RpcServer.Blockchain.cs[GetStorage], using id to be key.

* Accept id and hash

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

* Update Neo nuget to 3.0.0-CI00855 (neo-project#186)

* Update Neo nuget to 3.0.0-CI00855

* update

update

* fix balance not change for non-transfer tx (neo-project#181)

* fix balance not change for non-transfer tx

* deal with gas burn seperately

* remove conversion to null

* check stackitem null

* Fix IsNull

* Remove nullable

* Use constant

* PR correction

* modify check statement

* bug ifix

* send stackitem.null

* not tracker non-tx transfer history

* format

* format

* add check for invalid address

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

* adapt RpcClient to modules (neo-project#171)

* adapt RpcClient to modules

* fix json issue

* fix size calculate

* Fix getnep5balances name issue

* add wallet rpc methods, reconstruct rpc UT

* PR correction

* move models to rpc server

* delete models from rpcclient

* change plugins with model

* format names

* move models back to rpc client

* fix build error

* change test file

* auto calculate network fee, update version

* format code

* fix issue #1416 Deal with ContractParameterType.Any

* change GetStorage parameter to enable id query

* add test for issue #1416

* PR correction

* use snake_case in json

* update neo version

* Update src/RpcClient/RpcClient.cs

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

* Update src/RpcClient/RpcClient.cs

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

* PR correction

* update neo version

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
Co-authored-by: Shargon <shargon@gmail.com>

* Deal with contract destory (neo-project#196)

* deal with contract destory

* remove delete key

* Remove GetBlockSysFee (neo-project#199)

* remove GetSysFeeAmount in rpcserver

* remove getblocksysfee in rpcclient

* fix ut

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

* ByteArray -> ByteString (neo-project#215)

* Change module command (neo-project#187)

* change command

* Change comment

* Add nuget

* Update StatesDumper.cs

* Fix RelayResult issue (neo-project#220)

* Add CheckWitness to func invokefunction (neo-project#214)

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

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

* Enable programmatic configuration of RpcServer plugin (neo-project#206)

* seperate out plugin from rpcServer functionality

* Update src/RpcServer/RpcServer.cs

* CR Feedback

* fix encoding

* fix build break

Co-authored-by: Harry Pierson <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Fix SystemLog (neo-project#222)

* Update and consolidate nugets (neo-project#194)

* add multi-sig-transfer (neo-project#213)

* Update nugets (neo-project#226)

* Add StackItem ToJson (neo-project#221)

* Override RpcServerPlugin's name (neo-project#235)

* Fix RpcServer RegisterMethods (neo-project#239)

* Fix RpcServer RegisterMethods

* Update RpcServerPlugin.cs

OnPluginsLoaded() will do RegisterMethods

* Update nugets (neo-project#233)

* Close 232

* Sync to the latest neo.

* Fix UT

* Deal with exceptions

* Use last version

* Fix compilation

* Fix RPC module UTs.

Co-authored-by: superboyiii <573504781@qq.com>
Co-authored-by: zhuoqian <zhuoqian10@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Allow to share logs in read mode (neo-project#240)

* Allow to share logs in read mode

* Catch exception

* Update Logger.cs

* format

format

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Create generic getunclaimedgas and rename wallet ones (neo-project#243)

* Create generic getunclaimedgas and rename wallet ones

* Throw exception

* fix relay tx (neo-project#249)

* add issue template (neo-project#250)

* delete systemlog plugin (neo-project#246)

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

* Add plugin desc and fix ut (neo-project#257)

* add plugin desc and sync neo-core

* format

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

* Convert StackItem directly to json (neo-project#264)

* Change json field names for GetVersion (neo-project#262)

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

* remove system log (neo-project#272)

* Neo.VM.3.0.0-CI00958 (neo-project#274)

* fix

* fix event

* CI00958

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

* Add EventName to NotifyEventArgs (neo-project#267)

* Add EventName to NotifyEventArgs

* Update UT cases

* Change to all lower case

* Fix UTs

* Fix format

* Fix format again

* Replace db.Find by db.Seek (neo-project#279)

* replace find by seek

* add db.seek

* fix

* format

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

* Add a generic GetUnclaimedGas() in RpcClient (neo-project#273)

* Add GetUnclaimedGas() in RpcClient and UT

* Fix format

* Update tests/Neo.Network.RPC.Tests/RpcTestCases.json

Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Fix seek (neo-project#281)

* fix seek

* move Helper method

* Update Helper.cs

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

* Change json fields to all lower case for consistency (neo-project#277)

* Change json field names for GetVersion

* Change json fields to snake case for consistency

* Change json fields to all lower case

* Fix UTs.

* rename

* Add back GetUnclaimedGas()

* Remove "_" in RpcNep5Tracker.cs

* Remove underscore line

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Luchuan <luchuan@neo.org>

* fix add signature in invokefunction and invokescript (neo-project#280)

* fix add signature in invokefunction and invokescript

* Update RpcServer.SmartContract.cs

* rename

* fix format

* add exception if wallet or cosigners is null

* Set the default tx to null

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

* update nuget (neo-project#283)

* update nuget

* remove GasFree

* resolve conflict

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* update IStorageProvider (neo-project#285)

* update signers for invokefunction and invokescript (neo-project#286)

* update signers for invokefunction and invokescript

* fix format

* Validate signer format

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

* Add BloomFilter to levelDB (neo-project#253)

* Add BloomFilter to levelDB

* Code optimization

* Code optimization

* Optimize bloomfilter bits per key value

* Hard-code bloomfilter bitsPeyKey to 15

* Code optimization

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

* Solve workflow conflict (neo-project#294)

* Solve workflow conflict

Solve workflow conflict from master-2.x and master

* Update main.yml

Apply neo-project/neo#1775

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

* update InvokeFunction (neo-project#295)

* Fix db.Seek (neo-project#291)

* add db.seek ut

* fix db.seek

* remove ByteArrayCompare

Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* update RpcClient (neo-project#296)

* update RpcClient

* fix sln

* fix format

* fix format

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Add Utility.StackItemFromJson (neo-project#302)

* fix invoke tojson

* add StackItemFromJson

* optimize code

* remove src/RpcClientTests/UtilityTests.cs

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

* Merge Preview3 to Master (neo-project#307)

* Add Utility.StackItemFromJson (neo-project#302) (neo-project#303)

* fix invoke tojson

* add StackItemFromJson

* optimize code

* remove src/RpcClientTests/UtilityTests.cs

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

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

* update to preview3 (neo-project#305)

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

* fix neo-project#312 (neo-project#319)

* Allow to try to repair leveldb before opening (neo-project#322)

* update applicationLogs serialization (neo-project#321)

* Remove old bug (neo-project#331)

* Optimize RocksDb startup (neo-project#333)

* Fix RocksDb (neo-project#332)

* Add Getcommittee (neo-project#342)

* update signers and add sender for rpc api (neo-project#309)

* Optimize the result of 'getnep5transfers' (neo-project#345)

* Update RpcNep5Tracker.cs

* Update RpcNep5Tracker.cs

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

* Allow querying contracts by name (neo-project#340)

* Update dependencies (neo-project#338)

* Neo 3.0.0-CI01036 (neo-project#353)

* upgrade neo-core

* Add statesdumper

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

* Replace getvalidators by getnextblockvalidators (neo-project#366)

* Pure async RpcClient (neo-project#335)

* compiling, some stuff stubbed out

* more tests working

* MakeTxContext

* mistake in GetBlock/GetBlockHeader

* rework TransactionManager to be closer to original

* more unit tests (2 still failing)

* remove assertEx

* Add ThrowsAsync comment

* ReturnsAsync

* fixed last remaining test issues

* minor TXManager cleanup

* formatting

* move tx contruction to MakeTransaction

* discards

* Async Suffixes (PR feedback)

* GetCommitteeAsync

* add custom magic support to tx manager

* fix format

* add magic param comment

* CR Feedback

* Clean enter

Co-authored-by: Harry <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Add `magic` field in getversion (neo-project#363)

* add magic field in getversion

* fix rpc client

* fix

* Fix validateaddress (neo-project#365)

* fix validateaddress

* apply recommendation

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Allow rpc method can be overrided (neo-project#367)

* allow rpc method can be overrided

* change to protected virtual

* set DummyWallet private

* Update src/RpcServer/RpcServer.SmartContract.cs

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

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Update RpcServer.Utilities.cs (neo-project#374)

* add null check for transferaddress (neo-project#373)

* add null check for transferaddress

* add ut

* fix ut

* fix format

* fix

* merge master

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* invoke* use base64 script (neo-project#362)

* invoke* use base64 script

* fix rpc client

* fix ut

* fix validateaddress

* fix ut

* revert

* fix ProcessInvokeWithWallet

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Remove sender from invoke method (neo-project#368)

* remove sender from invoke method

* fix

* format

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Add `exception` field in invokeresult (neo-project#364)

* add exception field in invokeresult

* fix rpc client

* fix

* fix show exception message

* fix

* fix

* fix: add try-catch for processInvokeWithWallet

* fix

* apply

* trigger github action

* Singers

* fix

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* [RpcClient] Optimization code. (neo-project#372)

* optimization code

* conflict resolution 2

* conflict resolution 3

* update

* Update RpcApplicationLog.cs

* Update RpcBlock.cs

* Update RpcBlockHeader.cs

* Optimize return

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* [RpcClient] Add processing of Any type to StackItemFromJson method. (neo-project#371)

* Update Utility.cs

* Update RpcTestCases.json

* update

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Fix script convert in MakeTransaction(). (neo-project#382)

* Use Base64String on response of getrawtransaction (neo-project#383)

Use Base64String on response of getrawtransaction

* Unify to base64 (neo-project#384)

* Update RpcServer.SmartContract.cs (neo-project#386)

According to neo-project#368 (comment)

* [RpcClient] Policy API mismatch (neo-project#388)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* NEO3: RPC client Policy API mismatch

* update

* update

* update

* UT

* Format

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* [Sync to master] Unify base64 (neo-project#397)

* Unify base64 in SendRawTransaction and SubmitBlock

* fix GetRpcName() in GetWalletBalanceAsync

* add SubmitBlock

* add ProcessInvokeWithWallet

* Modify container in GetInvokeResult method (neo-project#390)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* Modify container in GetInvokeResult method

* .

* Update src/RpcServer/RpcServer.SmartContract.cs

Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>

* trigger type for getapplicationlog (neo-project#380)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* Keeping up to date with neo

* Keeping up to date with neo

* Revert "Keeping up to date with neo"

This reverts commit aa8e120.

* Prevent create key if not null

* dotnet format

* Query application log via blockhash

* update

* Modifying the Json storage structure

* Modifying the JSON storage structure 2

* Additional optional "trigger" parameter to getapplicationlog for clients to be able to get just one execution result for a block.

* Re-run checks

* StrictUTF8

* Update src/ApplicationLogs/LogReader.cs

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

* Optimize

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Update RpcApplicationLog.cs in RpcClient (neo-project#395)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* Update RpcApplicationLog.cs in RpcClient

* update

* Fixed UT

* ???

* update

* UT

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: superboyiii <573504781@qq.com>

* Update LogReader.cs (neo-project#401)

* Update LogReader.cs

* update

* [RpcServer] Update RpcServer.SmartContract.cs (neo-project#400)

* Update RpcServer.SmartContract.cs

* Update src/RpcServer/RpcServer.SmartContract.cs

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

* update

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: Shargon <shargon@gmail.com>

* use shared directory.build.props file (neo-project#403)

* use shared directory.build.props file

* Update src/LevelDBStore/LevelDBStore.csproj

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

* Update src/RocksDBStore/RocksDBStore.csproj

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

* Update src/RocksDBStore/RocksDBStore.csproj

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

* CR Feedback

* Fix namespace

Co-authored-by: Harry <harrypierson@ngd.neo.org>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Harry Pierson <harrypierson@outlook.com>

* create helper applog JSON functions for reuse in neo-express (neo-project#402)

* create helper applog JSON functions for reuse in neo-express

* Update LogReader.cs (neo-project#401)

* Update LogReader.cs

* update

Co-authored-by: Harry <harrypierson@ngd.neo.org>

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Igor Machado Coelho <igor.machado@gmail.com>
Co-authored-by: hal0x2328 <github@splyse.tech>
Co-authored-by: f27d <40597646+f27d@users.noreply.github.com>
Co-authored-by: belane <belane@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Ricardo Prado <38396062+lock9@users.noreply.github.com>
Co-authored-by: jsolman <jsolinsky@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: zhangtao <ztgoforit@163.com>
Co-authored-by: Celia18305 <32253925+Celia18305@users.noreply.github.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>
Co-authored-by: cn1010 <1062108372@qq.com>
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
Co-authored-by: cn1010 <baoting@onchain.com>
Co-authored-by: Qiao Jin <43407364+Qiao-Jin@users.noreply.github.com>
Co-authored-by: Harry Pierson <harrypierson@hotmail.com>
Co-authored-by: Harry Pierson <harrypierson@ngd.neo.org>
Co-authored-by: ZhangHaoqiang <gripzhang@outlook.com>
Co-authored-by: superboyiii <573504781@qq.com>
Co-authored-by: zhuoqian <zhuoqian10@gmail.com>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: joeqian <qianzhuo@ngd.neo.org>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>
Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: Harry Pierson <harrypierson@outlook.com>
chenzhitong pushed a commit to chenzhitong/neo-modules that referenced this pull request Nov 25, 2020
* add SimplePolicy

* add ApplicationLogs

* use leveldb in ApplicationLogs

* update dependency: Neo v3.0.0-preview2-04

Close #1

* Logging in millisecs

After change to Akka consensus in NEO 3.0, it's so fast that seconds do not mean much anymore.. now milliseconds is important to actually know of what is going on the consensus algorithm.

* remove break statement from FilterFree

* Fix Priority Fee Transactions being treated as Free (#4)

* add RpcDisabled

* add StatesDumper

* add ImportBlocks (#7)

* `yield break` when the height of the imported block reaches the limit

* detect recursive references in ApplicationLogs

* exporting blocks in plugin

* copy config.json to output directory automatically

* v2.9.0 (#9)

* fix SimplePolicyPlugin

* fix neo-project/neo#395

* Rpc Basic Auth (#14)

* Rpc Basic Auth

* change plugin name to RpcSecurity

* Including number of dumped states (#17)

* Including number of dumped states

* Update StatesDumper/StatesDumper.cs

Co-Authored-By: vncoelho <vncoelho@gmail.com>

* Readme (#18)

* misspelling (#26)

* Help for Plugins (#28)

* Transaction size plugin (#10)

* Update packages reference (#22)

* Basic unit test structure for SimplePolicyPlugin (#25)

* Persitence Plugin for exporting storage changes (#21)

* Persitence Plugin first draft

* Fixing some compiling problems. Trackable is still not found in the local scope.

* Minnor changes. Trackable still not found

* Fixing all compiling errors and Trackable

* Fixing StorageKey and Item get values

* Switch case Persist Action and fixing Storage export

* Adding Height To Being

* Moving plugin to StatesDumper

* minnor comments

* remove StatesDumper.sln

* format

* remove `Settings.BlockStorageCache`

* add `PersistActions`

* v2.9.3 (#31)

* Update packages reference

* Fix claim (#34)

* v2.9.4

* Expose the max TX per block and max low priority TX per block. (neo-project#37)

* Ensure PoW correct order for TXs tiebreakers (neo-project#38)

* Ensure PoW correct order for TXs tiebreakers

* ThenByAscending for Hash

* Expose HighPriorityTxType (neo-project#39)

* Expose HighPriorityTxType

* HigherLowPriorityTxTypes

* InHigherLowPriorityList

* Modify missing InHigherLowPriorityList

* Missing InHigherLowPriorityList

* Use InHigherLowPriorityList and change to public

* Clean

* Clean II

* Commit as the final step of persistence in StatesDumper (neo-project#40)

* Support commit as the final step of persistence.

* Update for new method .

* OnCommitStorage

* Adding tests and fixing typo (neo-project#41)

* Adding tests and fixing typo

* adding random attribute to claim

* unit tests for hash compare

* Creating Travis CI for neo-plugins (neo-project#42)

* Including PreProcess and PostProcess functions (neo-project#46)

* Including PreProcess and PostProcess functions

* Adding pre-post to RpcSecurity

* Fix missing public declaration (neo-project#48)

* Add RpcWallet (neo-project#44)

* Add RpcWallet

* Add `importprivkey`

* Add `from` parameter to `sendmany`

* Add `getunclaimedgas`

* Add `claimgas`

* Add reference: Neo 2.10.0

* Fix `importprivkey`

* Add plugin for NEP5 balances and transfer history (Persistence + RPC) (neo-project#43)

* Check authentication during pre-processing. (neo-project#54)

* v2.10.0

* Fix memory leak of LevelDB snapshots. (neo-project#57)

* Use IPersistencePlugin and batch Application Log writes. (neo-project#62)

* Fix sizes for RpcNep5Tracker (neo-project#67)

* Plugin CoreMetrics (neo-project#68)

* Plugin coreMetrics.

* Organize project files

* metric prefix

* Make calculation for extra gas on "send*" RPC (neo-project#70)

* Make calculation for extra gas on "send*" RPC

* Fix for the calculation when little overstep

* Add Max_Fee as the optional for gas limit. (neo-project#74)

* Make calculation for extra gas on "send*" RPC (neo-project#70)

* Make calculation for extra gas on "send*" RPC

* Fix for the calculation when little overstep

* Delete the dependency which is for testing purpose

* Choose the max_fee between  fee and extra_fee

* Change error codes

* Update Settings.cs

* format

* Add `NuGet.Config`

* fix size calculation (neo-project#75)

* Add Plugin for UTXO tracking by account. (neo-project#65)

* Add Plugin for UTXO tracking by account.

* Rename RpcSystemAssetPlugin -> RpcSystemAssetTracker.

* Accept address or script hash.

* Remove unnecessary white space.

* Update project ref to Neo 2.10.1-CI00002.

* Ensure consistency in case of crash or kill.

* Fix setting lastPersistedBlock after each block is persisted.

* Performance optimization: Don't write block number for empty blocks.

* Optimize.

* Add support for tracking unclaimed spent outputs.

* Provide getclaimable RPC call for getting available claim spent outputs.

* Clean-up.

* Don't leak memory.

* Implement getclaimable to get get total unclaimed amount for an address.

* Remove unnecessary comment.

* Fix size of UserSystemAssetCoinOutputs. Remove unused using statement.

* Reload max utxo's from configuration if it changes.

* Upgrade dependency

* Fix .sln for neo-project#65

* Updating Readme information (neo-project#76)

* Fixes `ImportBlocks` for Neo 2.10.1 (neo-project#78)

* v2.10.1

* Properly stop importing blocks on system shutdown. (neo-project#66)

* RpcNep5Tracker: Handle NEP5 transfers to/from null & limit max results (neo-project#71)

* Handle NEP5 transfers to/from null.
* Add support for tracking tokens using non-standard mintToken event.
* Implement maximum results to return for transfer history.
* Make whether to support tracking null address history configurable. Default to false.
* Better input validation
* Support tracking non-standard mintTokens event, but default to off.

* Small optimization (neo-project#82)

* Updating travis (neo-project#84)

* Fix output json for multisigaddress transaction (neo-project#86)

* Fix output json for multisigaddress transaction 

Fix output json for multisigaddress transaction

* format

* format

* Fix the height to end with (neo-project#88)

* Fix-heightToEnd

* Minor fix and comment

* Minor fix on storage state dumper parameter HeightToStartRealTimeSyncing (neo-project#91)

* Minor fix on storage state dumper parameter HeightToStartRealTimeSyncing

* Update StatesDumper/StatesDumper.cs

Co-Authored-By: vncoelho <vncoelho@gmail.com>

* Prevent exceed the height (neo-project#92)

* Update CoreMetrics.cs

I think that it could be exceeded the max height using the `lastHeight` parameter

* Update CoreMetrics.cs

* v2.10.2 (neo-project#96)

* Update CoreMetrics.cs (neo-project#94)

* Update dependency: Neo v3.0.0-CI00044 (neo-project#98)

* Updating README - Removing Asset Tracker plugin (neo-project#104)

Removing description of asset tracker plugin from NEO 3.0 plugins readme

* Prevent DoS with wrong files (neo-project#81)

* Prevent DoS with wrong files

* Constant

* Throw exception

* Clean

* Fixing uint to ulong for some plugins due to seconds to ms change (neo-project#107)

* Fixing uint to ulong for some plugins

* Removing .sln files

* Updating nuget to more recent daily build

* Removing SimplePolicy plugin (neo-project#110)

* Clean SimplePolicy

* Removing travis

* Completely removing SimplePolicy

* Updating readme

* Re-adding travis

* Dotnet restore on Travis

* Cleaning .sln

* Cleaning SP-UT

* SystemLog plugin (neo-project#117)

* CI00151 (neo-project#111)

* Remove `mintTokens` from RpcNep5Tracker

* Fixes deadlock in RpcNep5Tracker (neo-project#128)

* Updating README with RPC Wallet and SystemLog (neo-project#126)

* Fix RpcNep5Tracker (neo-project#125)

* Fixes output of `getbalance` (neo-project#132)

* Fix/memory (neo-project#135)

* use Singleton.Store.GetBlock optimize memory cause

* refactor

* v3.0.0-preview1 (neo-project#136)

* Update to v3.0.0-preview1

* update version number

* Fix cell on maxNBlocksPerDay (3.X) (neo-project#142)

* Fix cell on maxNBlocksPerDay

uint (86400/15000*10000) equals 5000 but not 5760 because ```maxNBlocksPerDay``` is uint but not float.

* Delete incoverable code

Delete incoverable code since unint can't be <0,. For example: uint(-1) = uint 4294967295.

* Fix nBlocks == 0

Fix nBlocks == 0

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

* Upgrade dependencies and target frameworks

* Update .travis.yml

* IStorage (neo-project#148)

* Fix UT (neo-project#149)

* Update RpcNep5Tracker/RpcNep5Tracker.cs

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

* Update RpcNep5Tracker/RpcNep5Tracker.cs

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

* Update RpcNep5Tracker/RpcNep5Tracker.cs

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

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

* Fix SystemLog

* Add LevelDBStore (neo-project#150)

* Neo v3.0.0-CI00817

* Fix leveldb (neo-project#153)

* Fix ApplicationLog (neo-project#154)

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

* RocksDb storage plugin (neo-project#144)

* RocksDb plugin

* Update IStoragePlugin.cs

* Clean name

* Refactor as IStore

* Remove Helper

* Reorder

* Remove IStorage

* Reduce sln changes

* sln bom

* Clean and optimize

* Update nuget

* Create and cache only families if are used

* Rename namespaces

* Rename classes

* 3.0 version

* Format

* Rename the directory

* SetSync

* Remove the DbOptions wrapper

* Update Options.cs

* Remove RocksDBCore

* Remove ColumnFamily.cs

* Rename RocksDbSnapshot to Snapshot

* Add config.json

* Update RocksDBStore.csproj

* Add storage UT

* Fix RocksDb

* Update dotnetcore.yml

* Update dotnetcore.yml

* Copy fix leveldb

* Remove test

* Remove comment

* Fix the fix

* Fix Clear method

* Some changes

* Fix sln

* Update dotnetcore.yml

* sudo apt

* add leveldb

* Update dotnetcore.yml

* Fix Dispose and add UT

* Clean using

* Optimize LevelDB init

* Move projects to src (neo-project#159)

* Remove ImportBlocks (neo-project#161)

* Update .sln

* Rename tests

* Add RpcClient (neo-project#163)

* Remove CoreMetrics (neo-project#164)

* Coveralls (neo-project#165)

* Add RpcServer (neo-project#160)

* Update README.md (neo-project#146)

* Update NuGet versions of all modules (neo-project#174)

* Update-package-rpc-client

* Update nuget

* Update Crypto.ECDsaVerify

* Update TransactionManager.cs

* Some fixes

* Change from public to protected as in level db (neo-project#177)

* Change from public to protected as in level db

* Update RocksDBStore.csproj

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

* Update neo nuget

* change network fee calculation (neo-project#178)

* change network fee calculation

* update to CI00847

* fix fee issue

* add UT for network fee

* Update versions

* Update src/RpcClient/TransactionManager.cs

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>

* Rpc limits (3x) (neo-project#172)

* Add some limits to rpc

* Updating to peer and comments

* Allow to configure MaxConcurrentConnections

* Enter

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

* update readme (neo-project#169)

* update readme

* more details for rpc-related plugins

* desc for plugin dependency

* add logo

* Improvement

Improvement

* Delete --log

Delete --log

* Format

Format

* Minor changes

* Adding note about NEP5 functionalities

* Updating with RpcServer

* Fix

Fix

* Format

Format

* Remove StorageEngine

Remove StorageEngine

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>

* dotnet-format (neo-project#185)

* Fix

* Fix

* Add dotnet format version

* Fix version

* Update main.yml

* Update main.yml

* Update main.yml

* Fix RpcServer[GetStorage] (neo-project#183)

* Fix RpcServer.Blockchain.cs[GetStorage], using id to be key.

* Accept id and hash

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

* Update Neo nuget to 3.0.0-CI00855 (neo-project#186)

* Update Neo nuget to 3.0.0-CI00855

* update

update

* fix balance not change for non-transfer tx (neo-project#181)

* fix balance not change for non-transfer tx

* deal with gas burn seperately

* remove conversion to null

* check stackitem null

* Fix IsNull

* Remove nullable

* Use constant

* PR correction

* modify check statement

* bug ifix

* send stackitem.null

* not tracker non-tx transfer history

* format

* format

* add check for invalid address

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

* adapt RpcClient to modules (neo-project#171)

* adapt RpcClient to modules

* fix json issue

* fix size calculate

* Fix getnep5balances name issue

* add wallet rpc methods, reconstruct rpc UT

* PR correction

* move models to rpc server

* delete models from rpcclient

* change plugins with model

* format names

* move models back to rpc client

* fix build error

* change test file

* auto calculate network fee, update version

* format code

* fix issue #1416 Deal with ContractParameterType.Any

* change GetStorage parameter to enable id query

* add test for issue #1416

* PR correction

* use snake_case in json

* update neo version

* Update src/RpcClient/RpcClient.cs

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

* Update src/RpcClient/RpcClient.cs

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

* PR correction

* update neo version

Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
Co-authored-by: Shargon <shargon@gmail.com>

* Deal with contract destory (neo-project#196)

* deal with contract destory

* remove delete key

* Remove GetBlockSysFee (neo-project#199)

* remove GetSysFeeAmount in rpcserver

* remove getblocksysfee in rpcclient

* fix ut

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

* ByteArray -> ByteString (neo-project#215)

* Change module command (neo-project#187)

* change command

* Change comment

* Add nuget

* Update StatesDumper.cs

* Fix RelayResult issue (neo-project#220)

* Add CheckWitness to func invokefunction (neo-project#214)

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

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

* Enable programmatic configuration of RpcServer plugin (neo-project#206)

* seperate out plugin from rpcServer functionality

* Update src/RpcServer/RpcServer.cs

* CR Feedback

* fix encoding

* fix build break

Co-authored-by: Harry Pierson <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Fix SystemLog (neo-project#222)

* Update and consolidate nugets (neo-project#194)

* add multi-sig-transfer (neo-project#213)

* Update nugets (neo-project#226)

* Add StackItem ToJson (neo-project#221)

* Override RpcServerPlugin's name (neo-project#235)

* Fix RpcServer RegisterMethods (neo-project#239)

* Fix RpcServer RegisterMethods

* Update RpcServerPlugin.cs

OnPluginsLoaded() will do RegisterMethods

* Update nugets (neo-project#233)

* Close 232

* Sync to the latest neo.

* Fix UT

* Deal with exceptions

* Use last version

* Fix compilation

* Fix RPC module UTs.

Co-authored-by: superboyiii <573504781@qq.com>
Co-authored-by: zhuoqian <zhuoqian10@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Allow to share logs in read mode (neo-project#240)

* Allow to share logs in read mode

* Catch exception

* Update Logger.cs

* format

format

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Create generic getunclaimedgas and rename wallet ones (neo-project#243)

* Create generic getunclaimedgas and rename wallet ones

* Throw exception

* fix relay tx (neo-project#249)

* add issue template (neo-project#250)

* delete systemlog plugin (neo-project#246)

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

* Add plugin desc and fix ut (neo-project#257)

* add plugin desc and sync neo-core

* format

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

* Convert StackItem directly to json (neo-project#264)

* Change json field names for GetVersion (neo-project#262)

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

* remove system log (neo-project#272)

* Neo.VM.3.0.0-CI00958 (neo-project#274)

* fix

* fix event

* CI00958

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

* Add EventName to NotifyEventArgs (neo-project#267)

* Add EventName to NotifyEventArgs

* Update UT cases

* Change to all lower case

* Fix UTs

* Fix format

* Fix format again

* Replace db.Find by db.Seek (neo-project#279)

* replace find by seek

* add db.seek

* fix

* format

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

* Add a generic GetUnclaimedGas() in RpcClient (neo-project#273)

* Add GetUnclaimedGas() in RpcClient and UT

* Fix format

* Update tests/Neo.Network.RPC.Tests/RpcTestCases.json

Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Fix seek (neo-project#281)

* fix seek

* move Helper method

* Update Helper.cs

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

* Change json fields to all lower case for consistency (neo-project#277)

* Change json field names for GetVersion

* Change json fields to snake case for consistency

* Change json fields to all lower case

* Fix UTs.

* rename

* Add back GetUnclaimedGas()

* Remove "_" in RpcNep5Tracker.cs

* Remove underscore line

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Luchuan <luchuan@neo.org>

* fix add signature in invokefunction and invokescript (neo-project#280)

* fix add signature in invokefunction and invokescript

* Update RpcServer.SmartContract.cs

* rename

* fix format

* add exception if wallet or cosigners is null

* Set the default tx to null

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

* update nuget (neo-project#283)

* update nuget

* remove GasFree

* resolve conflict

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* update IStorageProvider (neo-project#285)

* update signers for invokefunction and invokescript (neo-project#286)

* update signers for invokefunction and invokescript

* fix format

* Validate signer format

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

* Add BloomFilter to levelDB (neo-project#253)

* Add BloomFilter to levelDB

* Code optimization

* Code optimization

* Optimize bloomfilter bits per key value

* Hard-code bloomfilter bitsPeyKey to 15

* Code optimization

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

* Solve workflow conflict (neo-project#294)

* Solve workflow conflict

Solve workflow conflict from master-2.x and master

* Update main.yml

Apply neo-project/neo#1775

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

* update InvokeFunction (neo-project#295)

* Fix db.Seek (neo-project#291)

* add db.seek ut

* fix db.seek

* remove ByteArrayCompare

Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* update RpcClient (neo-project#296)

* update RpcClient

* fix sln

* fix format

* fix format

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Add Utility.StackItemFromJson (neo-project#302)

* fix invoke tojson

* add StackItemFromJson

* optimize code

* remove src/RpcClientTests/UtilityTests.cs

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

* Merge Preview3 to Master (neo-project#307)

* Add Utility.StackItemFromJson (neo-project#302) (neo-project#303)

* fix invoke tojson

* add StackItemFromJson

* optimize code

* remove src/RpcClientTests/UtilityTests.cs

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

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

* update to preview3 (neo-project#305)

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

* fix neo-project#312 (neo-project#319)

* Allow to try to repair leveldb before opening (neo-project#322)

* update applicationLogs serialization (neo-project#321)

* Remove old bug (neo-project#331)

* Optimize RocksDb startup (neo-project#333)

* Fix RocksDb (neo-project#332)

* Add Getcommittee (neo-project#342)

* update signers and add sender for rpc api (neo-project#309)

* Optimize the result of 'getnep5transfers' (neo-project#345)

* Update RpcNep5Tracker.cs

* Update RpcNep5Tracker.cs

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

* Allow querying contracts by name (neo-project#340)

* Update dependencies (neo-project#338)

* Neo 3.0.0-CI01036 (neo-project#353)

* upgrade neo-core

* Add statesdumper

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

* Replace getvalidators by getnextblockvalidators (neo-project#366)

* Pure async RpcClient (neo-project#335)

* compiling, some stuff stubbed out

* more tests working

* MakeTxContext

* mistake in GetBlock/GetBlockHeader

* rework TransactionManager to be closer to original

* more unit tests (2 still failing)

* remove assertEx

* Add ThrowsAsync comment

* ReturnsAsync

* fixed last remaining test issues

* minor TXManager cleanup

* formatting

* move tx contruction to MakeTransaction

* discards

* Async Suffixes (PR feedback)

* GetCommitteeAsync

* add custom magic support to tx manager

* fix format

* add magic param comment

* CR Feedback

* Clean enter

Co-authored-by: Harry <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* Add `magic` field in getversion (neo-project#363)

* add magic field in getversion

* fix rpc client

* fix

* Fix validateaddress (neo-project#365)

* fix validateaddress

* apply recommendation

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Allow rpc method can be overrided (neo-project#367)

* allow rpc method can be overrided

* change to protected virtual

* set DummyWallet private

* Update src/RpcServer/RpcServer.SmartContract.cs

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

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Update RpcServer.Utilities.cs (neo-project#374)

* add null check for transferaddress (neo-project#373)

* add null check for transferaddress

* add ut

* fix ut

* fix format

* fix

* merge master

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* invoke* use base64 script (neo-project#362)

* invoke* use base64 script

* fix rpc client

* fix ut

* fix validateaddress

* fix ut

* revert

* fix ProcessInvokeWithWallet

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Remove sender from invoke method (neo-project#368)

* remove sender from invoke method

* fix

* format

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Add `exception` field in invokeresult (neo-project#364)

* add exception field in invokeresult

* fix rpc client

* fix

* fix show exception message

* fix

* fix

* fix: add try-catch for processInvokeWithWallet

* fix

* apply

* trigger github action

* Singers

* fix

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* [RpcClient] Optimization code. (neo-project#372)

* optimization code

* conflict resolution 2

* conflict resolution 3

* update

* Update RpcApplicationLog.cs

* Update RpcBlock.cs

* Update RpcBlockHeader.cs

* Optimize return

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* [RpcClient] Add processing of Any type to StackItemFromJson method. (neo-project#371)

* Update Utility.cs

* Update RpcTestCases.json

* update

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Fix script convert in MakeTransaction(). (neo-project#382)

* Use Base64String on response of getrawtransaction (neo-project#383)

Use Base64String on response of getrawtransaction

* Unify to base64 (neo-project#384)

* Update RpcServer.SmartContract.cs (neo-project#386)

According to neo-project#368 (comment)

* [RpcClient] Policy API mismatch (neo-project#388)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* NEO3: RPC client Policy API mismatch

* update

* update

* update

* UT

* Format

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* [Sync to master] Unify base64 (neo-project#397)

* Unify base64 in SendRawTransaction and SubmitBlock

* fix GetRpcName() in GetWalletBalanceAsync

* add SubmitBlock

* add ProcessInvokeWithWallet

* Modify container in GetInvokeResult method (neo-project#390)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* Modify container in GetInvokeResult method

* .

* Update src/RpcServer/RpcServer.SmartContract.cs

Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>

* trigger type for getapplicationlog (neo-project#380)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* Keeping up to date with neo

* Keeping up to date with neo

* Revert "Keeping up to date with neo"

This reverts commit aa8e120.

* Prevent create key if not null

* dotnet format

* Query application log via blockhash

* update

* Modifying the Json storage structure

* Modifying the JSON storage structure 2

* Additional optional "trigger" parameter to getapplicationlog for clients to be able to get just one execution result for a block.

* Re-run checks

* StrictUTF8

* Update src/ApplicationLogs/LogReader.cs

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

* Optimize

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>

* Update RpcApplicationLog.cs in RpcClient (neo-project#395)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* Update RpcApplicationLog.cs in RpcClient

* update

* Fixed UT

* ???

* update

* UT

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: superboyiii <573504781@qq.com>

* Update LogReader.cs (neo-project#401)

* Update LogReader.cs

* update

* [RpcServer] Update RpcServer.SmartContract.cs (neo-project#400)

* Update RpcServer.SmartContract.cs

* Update src/RpcServer/RpcServer.SmartContract.cs

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

* update

Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: Shargon <shargon@gmail.com>

* use shared directory.build.props file (neo-project#403)

* use shared directory.build.props file

* Update src/LevelDBStore/LevelDBStore.csproj

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

* Update src/RocksDBStore/RocksDBStore.csproj

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

* Update src/RocksDBStore/RocksDBStore.csproj

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

* CR Feedback

* Fix namespace

Co-authored-by: Harry <harrypierson@ngd.neo.org>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Harry Pierson <harrypierson@outlook.com>

* create helper applog JSON functions for reuse in neo-express (neo-project#402)

* create helper applog JSON functions for reuse in neo-express

* Update LogReader.cs (neo-project#401)

* Update LogReader.cs

* update

Co-authored-by: Harry <harrypierson@ngd.neo.org>

Co-authored-by: erikzhang <erik@neo.org>
Co-authored-by: Igor Machado Coelho <igor.machado@gmail.com>
Co-authored-by: hal0x2328 <github@splyse.tech>
Co-authored-by: f27d <40597646+f27d@users.noreply.github.com>
Co-authored-by: belane <belane@users.noreply.github.com>
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
Co-authored-by: Ricardo Prado <38396062+lock9@users.noreply.github.com>
Co-authored-by: jsolman <jsolinsky@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
Co-authored-by: zhangtao <ztgoforit@163.com>
Co-authored-by: Celia18305 <32253925+Celia18305@users.noreply.github.com>
Co-authored-by: Krain Chen <ssssu8@qq.com>
Co-authored-by: cn1010 <1062108372@qq.com>
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
Co-authored-by: cn1010 <baoting@onchain.com>
Co-authored-by: Qiao Jin <43407364+Qiao-Jin@users.noreply.github.com>
Co-authored-by: Harry Pierson <harrypierson@hotmail.com>
Co-authored-by: Harry Pierson <harrypierson@ngd.neo.org>
Co-authored-by: ZhangHaoqiang <gripzhang@outlook.com>
Co-authored-by: superboyiii <573504781@qq.com>
Co-authored-by: zhuoqian <zhuoqian10@gmail.com>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Luchuan <luchuan@neo.org>
Co-authored-by: joeqian <qianzhuo@ngd.neo.org>
Co-authored-by: cloud8little <34291844+cloud8little@users.noreply.github.com>
Co-authored-by: Jin Qiao <jinqiao@neo.org>
Co-authored-by: Harry Pierson <harrypierson@outlook.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants