neo-project / neo-modules Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I'm writing a plugin to catch a transaction with a certain syscall. particularly, Neo.Contract.Create to log all deployed contracts.
I am aware that ApplicationExecutionResult
contains InteropInterface
in the stack.
sample contract deploy event from getapplicationlog
rpc
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"txid": "0x1fc9e3728b5a3d831bea9aa90fe463c6982039042e0302a7f8a86611660bf964",
"executions": [
{
"trigger": "Application",
"contract": "0x63c6111e93885ff24710426e167b7e87aa600d10",
"vmstate": "HALT, BREAK",
"gas_consumed": "500",
"stack": [
{
"type": "InteropInterface"
}
],
"notifications": []
}
]
}
}
my question is, How can I check it?
Can anyone shed some light on how to achieve this?
Guys, we are using kubernetes env, so I have neo-cli in docker. One of the basic concept - is having logs on stdout, so I would collect them, parse, index etc
Can we add a cli option, or config file, allowing application log plugin to send logs to stdout?
Followup to neo-project/neo-node#402
PostProcess() of RpcWallet plugin isn't loaded when using invoke
, invokescript
, invokefunction
, it goes to RpcServer.cs to look for these three methods although RpcWallet plugin is installed. Other method like sendtoaddress
, sendfrom
works well since OnProcess() in RpcWallet.cs is loaded.
For example, invoke
method isn't in RpcServer.cs so that json response shows “method not found”.
And when using invokefunction
, it goes to here, in Rpcserver.cs:
Neo-cli just get stuck after upgrade. For it to work I had to remove the contents of ApplicationLogs_00746E41/
Please fix it
If you kill neo-cli using control-c while using the application log plugin it can lead to inconsistency in application logs.
Is it possible to access an opened wallet in a RPC plugin?
RpcClient module is actually a light SDK which could be solely referenced for dApp development. But it is called RpcClient and be included in neo-modules. So the naming is little bit confusing for users or developers who want to use it as a neo plugin. So I will recommend we give it a more suitable and meaningful name. For example, RpcSDK or RpcClientSDK, etc.
We need to fix all plugins with Overide Configure
and GetConfiguration
in order to make it compile with Neo master.
Description:
when call getnep5transfers, auto-claim gas history not shown in the response. while it shows in the method getapplicationlog.
Reproduction steps:
Env: neo-node: a137b6f20c957706cfbbea323e2a1d18e8c79a14
neo: 3.0.0-CI00844
RpcNep5Tracker/applicationlog: c08ce90
win10 x64
Suggestion:
From users perspective, it is better to have the history for the method getnep5transfers, and thought that is what the plugin aims to implement. Besides preview1 supported the function too.
{ "jsonrpc": "2.0", "method": "getapplicationlog", "params": ["0xb1f1f85392d179084caf1b4b56916a6942f713212d2047300b3bef059f0c2dd3"], "id": 1 }
{ "jsonrpc": "2.0", "method": "getnep5transfers", "params": ["NX25qcUMBRBgAx4bcjrkNc4Tj6GWjqJVeD"], "id": 1 }
Response:
Uploading rpcResponse.zip…
public Logger(IActorRef blockchain, DB db)
{
this.db = db;
blockchain.Tell(new Blockchain.Register());
}
Register has been removed.
Recently, I find ApplicationLogs Plugin doesn't work while offline package syncing. This situation doesn't appear among official seed nodes but normal external nodes could always meet this issue.
I found that the leveldb format is also different between these two kinds of nodes, centOS is *.sst but Ubuntu is *.ldb. Not sure if it's the reason related to this issue. The normal one is on CentOS and the unnormal one is on Ubuntu. Seems they're using different version of LevelDB.
The phenomenon, for example, could be --> The offline sync package is at the height of 3400000+, when the sync is completed, find a random transaction at a lower height, such as finding an NEP-5 transaction at the height of 2800000, like f869e2ccaa916873ea4f648b8e16751f7c37963b97113e36b7da7628a2b06794
The result of rpc post is "Unknown transaction" on external nodes.
Today, the only way to debug the application is connecting to the node and use custom "PrintLine" calls.
I was thinking if we could have logs and other node metrics delivered thought RPC.
This way we could monitor several nodes at once, create health checks etc.
I don't know the impact in neo code base to make this work properly
The wallet does not stop properly when typing exit while in the processes of syncing using the ImportBlocks plugin.
I have another option: FASTER. https://github.com/microsoft/FASTER
FASTER is a concurrent key-value store + cache that is designed for point lookups and heavy updates. FASTER supports data larger than memory, by leveraging fast external storage. It also supports consistent recovery using a new checkpointing technique that lets applications trade-off performance for commit latency.
Detailed analysis of C# FASTER performance: https://github.com/Microsoft/FASTER/wiki/Performance-of-FASTER-in-C%23
FASTER is implemented in two languages: C# and C++.
The performance of the C# and C++ versions of FASTER are very similar.
@neo-project/core Let's consider it.
Originally posted by @erikzhang in neo-project/neo#966 (comment)
As mentioned here, this is a feature demanded by the customers and this is the correct repository to create this issue.
Since the RpcServer has been ported to the module repo by Erik, maybe it's the time to pick up the Restful and GraphQL servers (neo-project/neo#996).
REST update (#726) :
- Create swagger documentation (#1003)
- Add REST uri endpoints (#1004 )
- Update error messages (#975)
- Update SDK to use REST API
- Add REST API section to the documentation
GraphQL update (#623) :
- Create GraphQL schema
- Update data serialization methods
- Add GraphQL endpoint
- Update SDK to support GraphQL
- Add GraphQL section to the documentation
Any advice would be great. If possible, we'll submit these PRs.
Plugins/Settings.cs(53,106): error CS0117: 'Wallet' does not contain a definition for 'ToScriptHash' [/opt/neo/neo/neo.csproj]
@erikzhang, @shargon, @igormcoelho Nowadays, if there are 500 transactions with fees, no free transaction will enter in the Block.
We current have two limits:
In my opinion, if there are free transaction they should always compete between them but not with fee based transactions.
Thus, 480 fee transaction would enter and 20 free transactions as well.
If there are not 20 free transactions the ones with fee's will occupy this space.
I suggest that we change the following lines, extending mempool object to this method:
Transaction[] array = transactions.ToArray();
if (array.Length + 1 <= Settings.Default.MaxTransactionsPerBlock)
return array;
transactions = array.OrderByDescending(p => p.NetworkFee / p.Size).ThenByDescending(p => p.NetworkFee).Take(Settings.Default.MaxTransactionsPerBlock - 1);
return FilterFree(transactions);
This change would allow us to move towards other implementations, such as multiples mempools, with staked transactions or other ongoing discussed strategies.
The NEP-5 token standard does not mandate a storage key format or expose a mandatory method to get the prefix or or format of storage keys for the contract. We need this in the token standard in order to be able to use Patricia Tree in Neo 3.0 to validate balances. Also we need it to track token balance changes more efficiently.
Neo.Plugins.SimplePolicyPlugin' from assembly 'SimplePolicy, Version=2.9.4.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
When I use Application log plugin it outputs some meaningless symbols in log file like:
_�� o�
�
[<�m�I"� �`�87�"q���{"txid":"0xc4ff0271227f37389a601d9f200e00b72249896da23c5b000a00141fe40aea6f","executions":
What is that? can we use some ASCI characters in log please?
@jsolman, in this line here:
Are we currently calling this exception?
I am afraid that we currently not avoiding the .json
file to be created if the node is exited.
I have my /home/neo
directory with this layout:
-data
-Chain_00746E41
-SystemAssetBalanceData
-neo-cli with content:
-Plugins
-ApplicationLogs
-config.json
ApplicationLogs.dll
- RpcSystemAssetTracker
RpcSystemAssetTracker.dll
Akka.dll
Microsoft.AspNetCore.Connections.Abstractions.dll
Microsoft.AspNetCore.Hosting.Abstractions.dll
Microsoft.AspNetCore.Hosting.Server.Abstractions.dll
Microsoft.AspNetCore.Hosting.dll
Microsoft.AspNetCore.Http.Abstractions.dll
Microsoft.AspNetCore.Http.Extensions.dll
Microsoft.AspNetCore.Http.Features.dll
Microsoft.AspNetCore.Http.dll
Microsoft.AspNetCore.ResponseCompression.dll
Microsoft.AspNetCore.Server.Kestrel.Core.dll
Microsoft.AspNetCore.Server.Kestrel.Https.dll
Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll
Microsoft.AspNetCore.Server.Kestrel.dll
Microsoft.AspNetCore.WebSockets.dll
Microsoft.AspNetCore.WebUtilities.dll
Microsoft.CSharp.dll
Microsoft.Data.Sqlite.dll
Microsoft.DotNet.PlatformAbstractions.dll
Microsoft.EntityFrameworkCore.Abstractions.dll
Microsoft.EntityFrameworkCore.Relational.dll
Microsoft.EntityFrameworkCore.Sqlite.dll
Microsoft.EntityFrameworkCore.dll
Microsoft.Extensions.Caching.Abstractions.dll
Microsoft.Extensions.Caching.Memory.dll
Microsoft.Extensions.Configuration.Abstractions.dll
Microsoft.Extensions.Configuration.Binder.dll
Microsoft.Extensions.Configuration.EnvironmentVariables.dll
Microsoft.Extensions.Configuration.FileExtensions.dll
Microsoft.Extensions.Configuration.Json.dll
Microsoft.Extensions.Configuration.dll
Microsoft.Extensions.DependencyInjection.Abstractions.dll
Microsoft.Extensions.DependencyInjection.dll
Microsoft.Extensions.DependencyModel.dll
Microsoft.Extensions.FileProviders.Abstractions.dll
Microsoft.Extensions.FileProviders.Physical.dll
Microsoft.Extensions.FileSystemGlobbing.dll
Microsoft.Extensions.Hosting.Abstractions.dll
Microsoft.Extensions.Logging.Abstractions.dll
Microsoft.Extensions.Logging.dll
Microsoft.Extensions.ObjectPool.dll
Microsoft.Extensions.Options.dll
Microsoft.Extensions.Primitives.dll
Microsoft.Net.Http.Headers.dll
Microsoft.VisualBasic.dll
Microsoft.Win32.Primitives.dll
Microsoft.Win32.Registry.dll
Neo.VM.dll
Neo.dll
Newtonsoft.Json.dll
Remotion.Linq.dll
SOS.NETCore.dll
SQLitePCLRaw.batteries_green.dll
SQLitePCLRaw.batteries_v2.dll
SQLitePCLRaw.core.dll
SQLitePCLRaw.provider.e_sqlite3.dll
System.AppContext.dll
System.Buffers.dll
System.Collections.Concurrent.dll
System.Collections.Immutable.dll
System.Collections.NonGeneric.dll
System.Collections.Specialized.dll
System.Collections.dll
System.ComponentModel.Annotations.dll
System.ComponentModel.DataAnnotations.dll
System.ComponentModel.EventBasedAsync.dll
System.ComponentModel.Primitives.dll
System.ComponentModel.TypeConverter.dll
System.ComponentModel.dll
System.Configuration.dll
System.Console.dll
System.Core.dll
System.Data.Common.dll
System.Data.dll
System.Diagnostics.Contracts.dll
System.Diagnostics.Debug.dll
System.Diagnostics.DiagnosticSource.dll
System.Diagnostics.EventLog.dll
System.Diagnostics.FileVersionInfo.dll
System.Diagnostics.Process.dll
System.Diagnostics.StackTrace.dll
System.Diagnostics.TextWriterTraceListener.dll
System.Diagnostics.Tools.dll
System.Diagnostics.TraceSource.dll
System.Diagnostics.Tracing.dll
System.Drawing.Primitives.dll
System.Drawing.dll
System.Dynamic.Runtime.dll
System.Globalization.Calendars.dll
System.Globalization.Extensions.dll
System.Globalization.Native.so
System.Globalization.dll
System.IO.Compression.Brotli.dll
System.IO.Compression.FileSystem.dll
System.IO.Compression.Native.a
System.IO.Compression.Native.so
System.IO.Compression.ZipFile.dll
System.IO.Compression.dll
System.IO.FileSystem.AccessControl.dll
System.IO.FileSystem.DriveInfo.dll
System.IO.FileSystem.Primitives.dll
System.IO.FileSystem.Watcher.dll
System.IO.FileSystem.dll
System.IO.IsolatedStorage.dll
System.IO.MemoryMappedFiles.dll
System.IO.Pipelines.dll
System.IO.Pipes.AccessControl.dll
System.IO.Pipes.dll
System.IO.UnmanagedMemoryStream.dll
System.IO.dll
System.Interactive.Async.dll
System.Linq.Expressions.dll
System.Linq.Parallel.dll
System.Linq.Queryable.dll
System.Linq.dll
System.Memory.dll
System.Native.a
System.Native.so
System.Net.Http.Native.a
System.Net.Http.Native.so
System.Net.Http.dll
System.Net.HttpListener.dll
System.Net.Mail.dll
System.Net.NameResolution.dll
System.Net.NetworkInformation.dll
System.Net.Ping.dll
System.Net.Primitives.dll
System.Net.Requests.dll
System.Net.Security.Native.a
System.Net.Security.Native.so
System.Net.Security.dll
System.Net.ServicePoint.dll
System.Net.Sockets.dll
System.Net.WebClient.dll
System.Net.WebHeaderCollection.dll
System.Net.WebProxy.dll
System.Net.WebSockets.Client.dll
System.Net.WebSockets.WebSocketProtocol.dll
System.Net.WebSockets.dll
System.Net.dll
System.Numerics.Vectors.dll
System.Numerics.dll
System.ObjectModel.dll
System.Private.CoreLib.dll
System.Private.DataContractSerialization.dll
System.Private.Uri.dll
System.Private.Xml.Linq.dll
System.Private.Xml.dll
System.Reflection.DispatchProxy.dll
System.Reflection.Emit.ILGeneration.dll
System.Reflection.Emit.Lightweight.dll
System.Reflection.Emit.dll
System.Reflection.Extensions.dll
System.Reflection.Metadata.dll
System.Reflection.Primitives.dll
System.Reflection.TypeExtensions.dll
System.Reflection.dll
System.Resources.Reader.dll
System.Resources.ResourceManager.dll
System.Resources.Writer.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Runtime.CompilerServices.VisualC.dll
System.Runtime.Extensions.dll
System.Runtime.Handles.dll
System.Runtime.InteropServices.RuntimeInformation.dll
System.Runtime.InteropServices.WindowsRuntime.dll
System.Runtime.InteropServices.dll
System.Runtime.Loader.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Formatters.dll
System.Runtime.Serialization.Json.dll
System.Runtime.Serialization.Primitives.dll
System.Runtime.Serialization.Xml.dll
System.Runtime.Serialization.dll
System.Runtime.dll
System.Security.AccessControl.dll
System.Security.Claims.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Cng.dll
System.Security.Cryptography.Csp.dll
System.Security.Cryptography.Encoding.dll
System.Security.Cryptography.Native.OpenSsl.a
System.Security.Cryptography.Native.OpenSsl.so
System.Security.Cryptography.OpenSsl.dll
System.Security.Cryptography.Primitives.dll
System.Security.Cryptography.X509Certificates.dll
System.Security.Permissions.dll
System.Security.Principal.Windows.dll
System.Security.Principal.dll
System.Security.SecureString.dll
System.Security.dll
System.ServiceModel.Web.dll
System.ServiceProcess.ServiceController.dll
System.ServiceProcess.dll
System.Text.Encoding.Extensions.dll
System.Text.Encoding.dll
System.Text.Encodings.Web.dll
System.Text.RegularExpressions.dll
System.Threading.AccessControl.dll
System.Threading.Overlapped.dll
System.Threading.Tasks.Dataflow.dll
System.Threading.Tasks.Extensions.dll
System.Threading.Tasks.Parallel.dll
System.Threading.Tasks.dll
System.Threading.Thread.dll
System.Threading.ThreadPool.dll
System.Threading.Timer.dll
System.Threading.dll
System.Transactions.Local.dll
System.Transactions.dll
System.ValueTuple.dll
System.Web.HttpUtility.dll
System.Web.dll
System.Windows.dll
System.Xml.Linq.dll
System.Xml.ReaderWriter.dll
System.Xml.Serialization.dll
System.Xml.XDocument.dll
System.Xml.XPath.XDocument.dll
System.Xml.XPath.dll
System.Xml.XmlDocument.dll
System.Xml.XmlSerializer.dll
System.Xml.dll
System.dll
WindowsBase.dll
config.json
config.mainnet.json
config.testnet.json
createdump
libclrjit.so
libcoreclr.so
libcoreclrtraceptprovider.so
libdbgshim.so
libe_sqlite3.so
libhostfxr.so
libhostpolicy.so
libmscordaccore.so
libmscordbi.so
libsos.so
libsosplugin.so
mscorlib.dll
neo-cli
neo-cli.deps.json
neo-cli.dll
neo-cli.runtimeconfig.json
netstandard.dll
protocol.json
protocol.mainnet.json
protocol.testnet.json
I start neo-cli with
cd /home/neo/data
/home/neo/neo-cli/neo-cli --rpc --log
And no place in filesystem I see logs, or log folder.
cat /home/neo/neoc-cli/Plugins/ApplicationLogs/config.json
{
"PluginConfiguration": {
"Path": "ApplicationLogs_{0}"
}
}
Can you please tell where my logs are?
I am thinking about an UT for Import Blocks.
What do you think about an isolated docker file, integrated with Travis, that initializes neo-cli and sync some blocks?
Maybe we can also design it to avoid to be executed if files from ImportBlocks.cs were not modified.
The status datas of 2.x testnet are different when installing and not installing RpcNep5Tracker.
Steps
1.start one neo-cli with plugins(ImportBlocks, StatesDumper), connect to testnet, sync to the latest height.
2.start another neo-cli with plugins(ImportBlocks, StatesDumper, RpcNep5Tracker), connect to testnet, sync to the latest height.
3.Compare the Storage
files, 7 files are different.
Version
neo: master 2.x - 54d0f29c82fc38b4af7d7d2df05e4e564e7966dd
neo-cli: master 2.x - f81e60bac50c877f347bf04119b24d5afff158b7
neo-modules: master 2.x - 30ddf5c
neo-cli 2.10.1.0, ubuntu 18.04
started node using ./neo-cli --rpc --log
install
restarted the cli
but on plugins command "no plugins loaded"
plugin Files downloaded in /neo-cli/neo-cli/bin/Release/netcoreapp2.1/linux-x64/Plugins
Had some trouble starting neo-cli since the update to 2.10.1. This is what I got in the error log. After removing ImportBlocks, it runs as expected.
System.ArgumentException
Unable to resolve the target Provider
Parameter name: self
at Akka.Actor.Futures.Ask[T](ICanTell self, Func`2 messageFactory, Nullable`1 timeout, CancellationToken cancellationToken)
at Neo.Plugins.ImportBlocks.OnImport()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
We think that we just founddd part of the problem 😍 👌 🔧 💡
transactions = array.OrderByDescending(p => p.NetworkFee / p.Size).ThenByDescending(p => p.NetworkFee).Take(Settings.Default.MaxTransactionsPerBlock - 1);
Ex: imagine that we have more than MaxTxPerblock with fees, then
How would a free tx enter since array did not selected it inside transactions?
Maybe the assumption is the oposity of what is hapenning now, because the free are the only ones entering.
thus, there might be another problem in which the sort is inverted
If the assumption is right lets do it asap.
Plugins/Storage/RocksDBStore.cs(10,30): error CS0507: 'RocksDBStore.Configure()': cannot change access modifiers when overriding 'protected' inherited member 'Plugin.Configure()' [/opt/neo-plugins/src/RocksDBStore/RocksDBStore.csproj]
@shargon, do you have an idea?
Currently, there are good plugins, quite useful to the community, developed by communities and/or autonomous developers.
@hal0x2328, for example, recently did a good effort in two different plugins: 1- for monitoring CN; and 2- for local debugging.
Others type of plugins for testing are also useful during experimentation and etc.
While I also believe that we should keep this repository concise, I think that it should have more plugins.
Probably, in the future, it will not pass a number of 15-20 plugins.
When we reach such limit we would have already probably covered plenty of classes and applications. In this sense, if that time comes we might also just update plugins and keep improving them.
Otherwise, I am afraid that the community might need to create another repository for "extra" plugins. Without merging all that new good ideas we lose the ability of spreading good features that are being developed.
Issue: In NEO3, when in multisigaddress, someone use sendfrom
rpc to transfer asset from it, rpc response returns different format from neo-cli(I mean if he transfers the same asset from the same multisigaddress using command line in neo-cli). Seems the format from RPC is an old format which is the same as NEO2.X. It's not able to be sign
in neo-cli.
Step to Reproduce:
sendfrom
rpc to transfer asset from this address.sign
command line in neo-cli to sign it.Hi, I am interested if it's possible to open wallet remotely? I mean to create a plugin which will accept RPC method to open and close wallet or to encrypt and decrypt it?
Thanks!
I want to use RpcSecurity neo-plugin, but seems that in release compiled plugin is old yet (it's called RpcDisabled), and I need the new one (RpcSecurity).
There is no docs or Wiki for that, could please someone help me with that? Thank you!
@erikzhang
Guys, can you please release plugins with the same version as neo-cli? Currently we have 2.10.3 here https://github.com/neo-project/neo-cli/releases and for plugins latest is 2.10.2 https://github.com/neo-project/neo-plugins/releases
So not only I'm not sure if plugins work with the latest version, also my CI/CD pipe fails, as I use the same VERSION var to download both the cli and plugins
I just installed a fresh copy of neo-cli 2.9.3 and downloaded the latest release of the ImportBlocks
plugin. Upon starting neo-cli
I get the follow error:
PS D:\neo-cli2.9.3> .\neo-cli.exe
NEO-CLI Version: 2.9.3.0
neo> [ERROR][2018-12-14 11:33:18][Thread 0006][akka://NeoSystem/user/$a] not found
Cause: Neo.IO.Data.LevelDB.LevelDBException (0x80004005): not found
at Neo.IO.Data.LevelDB.DB.Get(ReadOptions options, Slice key)
at Neo.IO.Data.LevelDB.Helper.Get[T](DB db, ReadOptions options, Byte prefix, ISerializable key)
at Neo.Persistence.LevelDB.DbCache`2.GetInternal(TKey key)
at Neo.IO.Caching.DataCache`2.get_Item(TKey key)
at Neo.Ledger.Blockchain.Persist(Block block)
at Neo.Ledger.Blockchain.OnImport(IEnumerable`1 blocks)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
[ERROR][2018-12-14 11:33:18][Thread 0006][akka://NeoSystem/user/$a] Error while creating actor instance of type Neo.Ledger.Blockchain with 2 args: (Neo.NeoSystem,Neo.Persistence.LevelDB.LevelDBStore)
Cause: [akka://NeoSystem/user/$a#953832355]: Akka.Actor.PostRestartException: Exception post restart (Neo.IO.Data.LevelDB.LevelDBException) ---> System.TypeLoadException: Error while creating actor instance of type Neo.Ledger.Blockchain with 2 args: (Neo.NeoSystem,Neo.Persistence.LevelDB.LevelDBStore) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Neo.Ledger.Blockchain..ctor(NeoSystem system, Store store)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Akka.Actor.Props.ActivatorProducer.Produce()
at Akka.Actor.Props.NewActor()
--- End of inner exception stack trace ---
at Akka.Actor.Props.NewActor()
at Akka.Actor.ActorCell.CreateNewActorInstance()
at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
at Akka.Actor.ActorCell.UseThreadContext(Action action)
at Akka.Actor.ActorCell.NewActor()
at Akka.Actor.ActorCell.FinishRecreate(Exception cause, ActorBase failedActor)
--- End of inner exception stack trace ---
PS D:\neo-cli2.9.3>
If I remove the ImportBlocks
plugin, then neo-cli
works fine.
@belane, @shargon, @igormcoelho, @erikzhang and @jsolman, I just wonder if there is any problem in the way that C# sort/order the fixed8 class.
Here is the definition of this struct/class:
https://github.com/neo-project/neo/blob/c64748ecbac3baeb8045b16af0d518398a6ced24/neo/Fixed8.cs
Here is a normal sorting with NetworkFee
being this fixed8 object.
transactions = array.OrderByDescending(p => p.NetworkFee / p.Size).ThenByDescending(p => p.NetworkFee).Take(Settings.Default.MaxTransactionsPerBlock - 1);
I am not expert in C# abstract functions, but I believe that the sorting mechanism probably calls some of these virtual implemented function that contains override
: public override bool Equals(object obj)
and public override int GetHashCode()
In the way it works it calls public int CompareTo(Fixed8 other)
.
It's on mainnet using seed node6 and seed node10 for invoking ApplicationLogs which are in versions of 2.10.0 and 2.10.1.
What do you think? @neo-project/core
https://github.com/neo-project/neo-plugins/blob/db04e756a64c149e86d117fe89879c72f319c7df/SimplePolicy/SimplePolicy/config.json#L5
It causes a problem for ClaimTransaction.
For ClaimTransaction, people can't add network fee to it because it's set to zero, which means every ClaimTransaction is free transaction.(https://github.com/neo-project/neo/blob/7883e587a9448330d21669ebe748402871da3a50/neo/Network/P2P/Payloads/ClaimTransaction.cs#L16) Besides, the size of ClaimTransaction is usually larger than 1024. If we set MaxFreeTransactionSize to 1024, all ClaimTransaction will be influenced. If we make MaxFreeTransactionSize larger than 1024, then it's a meaningless configuration item. We get a paradox here.
Another thing is We can't prioritize ClaimTransaction anyway.
(https://github.com/neo-project/neo/blob/7883e587a9448330d21669ebe748402871da3a50/neo/Network/P2P/Payloads/Transaction.cs#L52)
This plugin depends on UTXO, it must be refactored to work with NEO 3
From @shargon:
#114 (comment)
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. Is there any possibility of the VM difference between 2.4.0 and 2.4.2?
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.1+. The result is the same as my privatenet. It worked as expected. But it still doesn't work on mainnet.
For example, on mainnet, I choose a random address "AZsvkf5fopsUvfMbsHfx9qKmwswtgdsgZv" which has a transaction on height of "1768508".
The txid is "0f2896032f3ad8614ce50e87b0db17a028bba976d25715f517c9201de82ee7d5".
Then I use getnep5transfers to get all nep5 transaction history. But the result is like this.
Nothing is there.
Export block makes extremely high cost of memory which usually cause system killed on Linux.
On mainnet export, our server which has 16G memory, is only able to hold on about 2 million blocks' export. After that, it's been killed by ubuntu. Here's the line graph. I think ImportBlocks plugin is necessary to improve algorithm for export.
Describe the bug
Getnep5balances, balance won't change when a tx is not transfer. Then, make a transfer tx, the gas balance value will return to normal.
To Reproduce
1.open wallet 6.json, deploy a smartcontract, list asset, gas balance = 8.9850761
2.rpc getnep5balances, gas balance didn't change, gas balance = 10
3.make a transfer transaction, list asset, gas balance = 6.9723922
4.rpc getnep5balances, gas balance changed, gas balance = 6.9723922
Two nodes aren't able to run in one PC at the same time if they all have installed RpcNep5Tracker,
even though there's no port conflict. If one of them uninstalls this plugin, they all work well.
I deployed an nep5 sc and it works well when making transaction and RpcNepTracker is able to catch its balance and transaction record. Then I made a wallet with two addresses. One has nep5 asset, the other is a clean address. However when I tried to invoke getbalance
via RPC, it always return 0 on value . Then I made a single-address wallet within nep5 asset, it did return correct value. And when I invoke native sc (neo and gas), it always returns correct value. I think there might be some issues happened when balance=0 (Maybe it doesn't return 0 but null).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.