Coder Social home page Coder Social logo

neo-express's People

Contributors

ashuaidehao avatar celia18305 avatar chenzhitong avatar cschuchardt88 avatar dependabot[bot] avatar devhawk avatar edgedlt avatar ixje avatar jim8y avatar johndevadoss avatar lock9 avatar meevee98 avatar metachris avatar pazbazak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neo-express's Issues

DeathPactException on preload

PS> dotnet run -- create -p 1000
Created 1 node privatenet at C:<path removed for privacy reasons>\default.neo-express.json
Note: The private keys for the accounts in this file are are not encrypted.
Do not use these accounts on MainNet or in any other system where security is a concern.
Creating 125 empty blocks to preload 1000 GAS
Creating Block 100
Preload complete. 1000 GAS loaded into genesis account.
[ERROR][3/12/2020 11:09:03 PM][Thread 0004][akka://NeoSystem/system/IO-TCP/$a] Monitored actor [[akka://NeoSystem/user/$b#1672422064]] terminated
Cause: Akka.Actor.DeathPactException: Monitored actor [[akka://NeoSystem/user/$b#1672422064]] terminated
at Akka.Actor.ActorBase.Unhandled(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.ReceivedTerminated(Terminated t)
at Akka.Actor.ActorCell.AutoReceiveMessage(Envelope envelope)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)

Support json file input for neo 2 contract invocation

contract invocation isn't really feasible on the command line for anything but the simplest contracts. Instead of (or in addition to) providing contract parameters on the command line, user should be able to author a json file w/ the required parameters and pass a pointer to that file to contract invoke

use virtual Execute method

In next NEO 3 preview, ExecutionEngine.Execute will be virtual. Move ExpressApplicationEngine start/end trace logic to virtual override of Execute method

Broken claim gas command

Encountering some problems using commands since I last updated.

show gas no longer works for me, show unclaimed (found it from #8) does work however:

I see from here that there are some other undocumented subcommands like unspents and claimable.

Is there any reason why claimable is a separate command to unclaimed, with different response formats? It seems like these should be unified (maybe have claimable as another alias).

Edit: Found answers to the above in the dev branch docs and claimable/unclaimed distinction from the official API docs.

My bigger problem right now is that claim gas does not work, it just opens the claim help context menu. That's blocking me from doing anything else with the private net.

support stable contract hash during development

contracts in NEO are identified by their script hash. However, during development, this hash changes with every update to the contract. Is there a way we can use a stable value that doesn't change during development for the hash?

At one point, neo-express was going to integrate with neo-debug to support an integrated debugging mode. neo-debug went a different path for getting blockchain data, but as part of that work we created a DebugSnapshot that made a contract appear to be deployed w/o having to actually deploy it. I'm thinking we could do something similar by adding a --contract <avmPath> argument to the run and checkpoint run commands. This argument would make the contract(s) appear to be deployed, but identifying contract by hashing the avm file name (not path, just filename).

New design of express-get-populated-blocks requires O(n) RPC calls to render a single page of blocks in the dev tracker

We initially created the express-get-populated-blocks to avoid having to make O(n) RPC calls when rendering a filtered page of blocks in the dev tracker (where n is the size of the blockchain).

The new design re-introduces this characteristic. It is 100x faster than it used to be (100 blocks can be checked at once) but still results in an unusable dev tracker UI experience when viewing a blockchain that has mostly unpopulated blocks (this will be common if a developer has left neo-express running generating empty blocks every 15s).

Suggest reverting #36. If we need a more efficient implementation of express-get-populated-blocks, we should maintain a persistent bitset of populated blocks within neo-express and update it as blocks are created. The dev tracker cannot maintain this data structure as it changes in-between checkpoints.

Support latest invoke file format draft

contract hash changes with every code change. Having to change the hash value of every neo-invoke file on every code change gets very tedious. Add support for specifying a relative path to the .nef file instead of specifying the hash directly

specifics detailed in NDX Design Note 12

Use StorageKey.CreateSearchPrefix

ExpressApplicationEngine.WriteStorages has its own copy of CreateSearchPrefix as StorageKey.CreateSearchPrefix was marked internal in Neo 3 preview 3. Will be public in next preview, so switch GetStorages to use it

Invalid JavaScript property identifier character

Gas related commands give all the error 'Invalid JavaScript property identifier character: -. after the transfer from the genesis block

OSX 10.15.6
node 12.18.3 (via nvm)

Step the reproduce the error

  • run 0 -r

  • wallet create dev

  • show coin Dev
    []

  • show gas Dev
    Unclaimed GAS for Dev: 0
    Available GAS: 0
    Unavailable GAS: 0

So far so good.

  • transfer neo 10 genesis Dev
    Transfer Transaction 0x51b1864e3ea0ee0f3c25aec6e0e4c9fecb37d5a5a9858c6f82c571a7f734a0fa submitted

  • show account Dev
    Account information for Dev:
    Asset 0xc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b: 10

  • show gas Dev
    Invalid JavaScript property identifier character: -. Path 'result.unavailable', line 1, position 52.

  • show claimable Dev
    Invalid JavaScript property identifier character: -. Path 'result.claimable[0].generated', line 1, position 178.

add aliases for show unclaimed and show unspents

these show sub commands were named to match the underlying RPC endpoints. But this naming scheme is not intuitive for users.

  • show gas should be an alias for show unclaimed
  • show unspent should be an alias for show unspents

"Object reference not set to an instance of an object" after neo-express contract invoke when running Runtime.CheckWitness(owner)

Using this simple test contract:

using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Services.Neo;

public class NEP5 : SmartContract
{
    private static readonly byte[] owner = "AHWz3eLZL2Ymc8PKhQKzq9xDczWJf5K2ac".ToScriptHash();
    public static void Main()
    {
        bool isOwner = Runtime.CheckWitness(owner);
        if (isOwner) 
            Storage.Put(Storage.CurrentContext, "Hello", "World from owner");
        else
            Storage.Put(Storage.CurrentContext, "Hello", "World NOT from owner");

    }
}`

with the standard setup of the neo-blockchain-toolkit works in debug mode (returns always true as defined in the default.neo-express.json) but throws an exception when running invoke from the terminal as follows:

C:...\NEP5>neo-express contract invoke NEP5 --account testWallet
Object reference not set to an instance of an object.
Usage: neo-express contract invoke [options]

Running the same contract after just changing the Runtime.CheckWitness line by:

bool isOwner = true;

works well. So I conclude is the call to CheckWitness that fails.

running main works in Debug NeoCompiler and in the de

NEP5.zip

add count and start parameters to get-populated-blocks RPC command

count parameter indicates the maximum number of populated blocks to return. This number defaults to 20 and has a maximum of 100. Asking for more than 100 will only return the first 100 populated blocks blocks.

start parameter indicates what block index to start from. by default, the current block height is used. If a start parameter larger than current block height is specified, current block height is used

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.