Giter Site home page Giter Site logo

neo-one-suite / neo-one Goto Github PK

View Code? Open in Web Editor NEW
94.0 8.0 33.0 36.71 MB

The One for easy, fast, & fun NEO app development.

Home Page: https://neo-one.io

License: MIT License

JavaScript 1.59% CSS 0.02% TypeScript 97.90% Shell 0.02% HTML 0.03% Dockerfile 0.01% C# 0.42%
neo neo-blockchain neo-one

neo-one's Introduction

NEO•ONE

This branch is under heavy development during our migration to N3. Please see the master-2.x branch for currently published source code.

All Contributors CircleCI codecov PRs Welcome DeepScan grade CII Best Practices

Contributing

Welcome to the NEO•ONE community! We're always looking for more contributors and are happy to have you. Documentation on how to contribute can be found here.

Contributors

Thanks goes to these wonderful people (emoji key):


Alex DiCarlo

💻 🐛 📖 🔍 👀 📢

Spencer Corwin

💻 📖 👀

Daniel Byrne

💻 📖 👀

Alex Fragapane

💻 📖 👀

Tai Ng

💻 📖

davemneo

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

NEO•ONE is MIT licensed.

neo-one's People

Contributors

afragapane avatar bors[bot] avatar danwbyrne avatar davemneo avatar dicarlo2 avatar ftgibran avatar hal0x2328 avatar lock9 avatar ndhuutai avatar renovate-bot avatar renovate[bot] avatar spencercorwin 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  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  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

neo-one's Issues

get wallet should allow fetching all wallets regardless of network

Description

Rather than a requirement, get wallet should optionally take the network to filter results down to. Otherwise it should show all wallets across all networks.

Steps to Reproduce

  1. create net neo
  2. deactivate net
  3. get wallet

Expected behavior: Shows all wallets across all networks (in this case, the master wallet of the neo network).

Actual behavior: Errors expecting a network.

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada

neo-one initial startup takes ~15 seconds

Description

neo-one starts up the NEO-ONE server. For some reason, when it's started as a subprocess from the interactive cli, the interactive cli takes up to 15 seconds to connect. In contrast, the interactive cli connects immediately after starting it manually separately (i.e. running neo-one start server), even one right after the other (i.e. no delay).

Steps to Reproduce

  1. neo-one

Expected behavior: Starts quickly

Actual behavior: Takes ~15 seconds

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Seems like it's an issue with the grpc connection, that's where we're waiting in the startup process.

Node sporadically stops logging

Description

Hard to reproduce, but starting a new main net node typically reproduces in about a minute. Seems to coincide with a large number of SocketTimeOutErrors followed by closing the peers, but I haven't been able to trace what's causing winston to stop logging. Here's an example set of logs: https://gist.github.com/dicarlo2/af63188a9c63aa1c81f1841a69ce89d0

Steps to Reproduce

  1. create net main
  2. tail the output logs (find the node directory with debug)
  3. observe that eventually logs stop being produced with messages similar to the gist above.

Expected behavior: Logs continue to be produced.

Actual behavior: Logging stops

Reproduces how often: < 100%

Versions

v0.0.2

Additional Information

Nada

nuke doesn't cleanly delete resources

Description

neo-one nuke deletes the data paths without cleanly stopping/deleting resources.

Steps to Reproduce

  1. create net neo
  2. neo-one nuke

Expected behavior: Stops and cleanly deletes neo network

Actual behavior: neo network is still running.

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada

CRUD commands should automatically use current session for arguments

Description

E.g. if network "neo" and wallet "master" are activated, then "describe net" and "describe wallet" should just work.

Steps to Reproduce

  1. create net neo
  2. describe wallet

Expected behavior: Describes master wallet

Actual behavior: Errors

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada.

Compiler plugin polish

Description

Some polish that needs to be done for the compiler plugin:

  1. Rename create -> compile
  2. Rename compiled-smart-contract to contract (so compiling looks like compile contract)
  3. Links to ABI documentation for declaring the smart contract ABI
  4. Wording on progress could use some work, e.g. "Completed final setup" doesn't make a whole lot of sense for compiling a smart contract.
  5. Possibly build an easy way to generate the ABI. Either an interactive cli or maybe a web tool? (Might be best to split this into another issue)

Speed up private net consensus

Description

So that deploying/invoking/etc. is much more responsive. Also see if it makes sense to reduce the number of nodes.

Describing a smart contract should print out the contract info (name, author, etc.)

Description

Title.

Steps to Reproduce

  1. create net neo
  2. compile contract foo foo.py --abi abi.json
  3. deploy smartcontract foo --contract foo
  4. describe smartcontract foo

Expected behavior: Prints out all of the ContractJSON info.

Actual behavior: Does not print it out.

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Code pointers:

Duplicate line printed for every command on Windows/cygwin

Title.

Steps to Reproduce

  1. Run the neo-one interactive CLI on Windows/cygwin
  2. Type any command - e.g. create net altest
  3. Observe result:
    neo-one$ create net altest
    neo-one$ create net altest
    √ Create network altest
    √ Execute final setup
    √ Start network altest
    √ Execute plugin hooks

Expected behavior: No duplicate line should be printed
Actual behavior: A duplicate line is printed

Reproduces how often: Every time.

Versions

v0.0.1

Additional Information

Found on Windows 10 + cygwin

Private network fast-forward

Description

Add a feature to allow fast forwarding the current block time of a private network for testing time-sensitive smart contracts (e.g. ico end times).

Add more information to network describe.

Description

describe network currently shows pretty limited information, just the status of the server and the urls for reaching it. Off the top of my head, it would be nice if it also showed:

  • Current block height
  • Consensus status (i.e. a string that's one of something like 'LEADER', 'RESPONDED', 'REQUESTED', etc. based on the node's current stage in the consensus algorithm)

Steps to Reproduce

  1. create net neo
  2. describe net neo

Expected behavior: Shows rich information about the network.

Actual behavior: Shows limited information

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Code pointers:

  • Node RPC is defined here
  • Consensus algorithm is here
  • Modify ReadClient to expose the additional information added to the rpc.
  • Use createReadClient to grab a client to read data from the node.

Cancelling/interrupting commands does not work when @neo-one/cli is run as a subprocess

Description

Some commands are interruptible with ^C. Interruption fails and causes the cli to get into a frozen state when the cli is run as a subprocess of another process through Node's child_process. Typing anything throws an error that seems to indicate the stdin stream has been closed, so TTY fails to read anything. Related google search for error shows a lot of people run into this, but there doesn't seem to be a solution: https://www.google.com/search?q=Error%3A+read+EIO&oq=error&aqs=chrome.5.69i64j69i60l3j69i59l2.10744j0j7&sourceid=chrome&ie=UTF-8

Steps to Reproduce

  1. yarn link
  2. yarn run neo-one
  3. get net --watch
  4. ^C
  5. Type anything

Expected behavior: ^C should interrupt the watch

Actual behavior: Errors out

Reproduces how often: 100%

Versions

0.0.1

macOS Sierra 10.12.6

Add compile python/c# to cli

Description

Title.

Steps to Reproduce

  1. compile foo <foo.py | foo.dll>

Expected behavior: Nothing happens (errors)

Actual behavior: It should compile foo.py or foo.dll and save it to be referenced later by the name foo.

Reproduces how often: 100%

Versions

v.0.0.1

Additional Information

Nada

ec-key expects version ~6.0

Means we have to use --ignore-engines with yarn. Doesn't seem like there's an incompatibility with higher versions of Node.

Deleting a network should delete all dependent resources

Description

Deleting a network (or more generally, deleting a resource) should delete all dependent resources.

Steps to Reproduce

  1. create net neo
  2. delete net neo

Expected behavior: Automatically created wallet "master" should be deleted.

Actual behavior: It is not.

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

We could implement this plugin by plugin, but it might be nice to have a generic cleanup call for resources. I.e. a declarative way for a plugin to tell the server framework that the resource it just created is dependent on another resource, and to delete it if the other resource is deleted. Perhaps it should also extend to stopping and starting? Marked as a bug in addition to an enhancement because it causes weird behavior in the cli.

Create separate build configs for browser and node

Description

NEO-ONE requires node 8.9.0 but we're basically transforming and polyfilling everything in order to support the browser modules (i.e. @neo-one/client). Let's setup a build configuration that targets browser and node separately so that we don't have to polyfill and transform everything for Node.

Deactivating a network should also deactivate dependent resources (like wallets)

Description

It doesn't make sense to keep a wallet activated when it's dependent network is deactivated.

Steps to Reproduce

  1. create net neo
  2. deactivate net

Expected behavior: master wallet is also deactivated.

Actual behavior: master wallet is still activated.

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Similar to #7, it might be nice for a declarative way to describe these kinds of dependencies. We might need to make activate/deactivate a first class command (i.e. known to @neo-one/cli directly). Alternatively, just using existing hooks and implementing the behavior manually works too - we can always refactor later if we see common patterns.

Node does not properly connect to non-seed peers

Description

Node implementation doesn't seem to ever successfully connect to other peers.

Steps to Reproduce

  1. Start the node
  2. Observe that it only successfully connects to seeds

Expected behavior: Connects to many peers in the network

Actual behavior: Does not

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Noticed this happening with NEO Tracker nodes.

ctrl+C does not exit the CLI properly on Windows

Description

Title.

Steps to Reproduce

  1. Run the neo-one interactive CLI on Windows/cygwin
  2. Press ctrl+C
  3. Observe lack of exit/cleanup messages

Expected behavior: In the case where a command is being typed, the command is cleared. In the case where the CLI is empty, cleanup/exit processes are run and exit messages are displayed.

Actual behavior: CLI completely exits without any cleanup or exit messages in all cases.

Reproduces how often: Every time.

Versions

v0.0.1

Additional Information

Shell windows created for each node on Windows

Description

Title.

Steps to Reproduce

  1. start the cli on windows using cygwin
  2. run command: create net wintest
  3. observe shell windows created for each node (node.exe)

Expected behavior: Creating a node should not create a window

Actual behavior: Creating a node creates a window

Reproduces how often: Every time

Versions

v0.0.1

Additional Information

Productionize + test node

Description

Need to close out the other issues and then test that everything is working with main and testnet. Also need to verify and setup backups.

delete command should prompt for confirmation

Description

neo-one delete (or aliases) should prompt to confirm.

Steps to Reproduce

  1. create net neo
  2. delete net neo

Expected behavior: Prompts to confirm deletion

Actual behavior: Deletion happens immediately

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Code Pointers:

  • Deletion command is defined here

Migrate old @neo-one/client tests

Description

I reworked the Client apis but kept the old files around under migrate since there was good test coverage and I think we can reuse a lot of the tests. Let's try to move as much of the testing to the new Client apis and then remove the migrate folder.

^C during inquirer prompts kills the cli

Description

Ctrl+C during inquirer prompts throws an error that kills the CLI.

Steps to Reproduce

  1. create net main
  2. create wallet foo
  3. ^C

Expected behavior: Exits the inquirer prompt and cancels the command

Actual behavior: Kills entire cli

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada

Consider reworking Errors

Description

We currently extend the native Error class for simplicity/organization and put most errors in a errors.js file. We use error.code to test for specific errors since instanceof doesn't work for built-ins. This has been working fine, however babel beta36 incorporates a fix for extending native built-ins that seems to break Error subclassing entirely - message and stack no longer appear. Given the issues surrounding extending Error directly, perhaps we should just move to Node's model of throwing errors - a single file (or perhaps one per package) that contains functions for throwing standardized Errors with code properties, rather than subclassing.

Marking as high priority since it blocks moving to new versions of babel.

Simulations plugin

Description

Add simulations plugin. Simulations are a way to get started quickly with a pre-configured dapp setup and tutorials designed to help learn the initial concepts. They should function similar to create-react-app.

Initial Scenarios:

Create the simulation:

  1. neo-one create simulation @neo-one/simulation-ico-tutorial

Expected behavior:

  1. Installs @neo-one/simulation-ico-tutorial
  2. Prompts for language (Python or C#)
    2a. Prompts for unique simulation name if one already exists
  3. Clones neo-one-ico-tutorial and switches to the respective branch (py or csharp)
  4. Drops into the neo-one cli
  5. Creates resources for the ico tutorial (private network, wallet, smart contract, etc.)
  6. Starts a webserver for the ICO

Stop the simulation:

  1. stop simulation ico-tutorial

Expected behavior:

  1. Stops all resources created by ico-tutorial
  2. Stops the webserver.

Start the simulation:

  1. start simulation ico-tutorial

Expected behavior:

  1. Start all resources created/required by ico-tutorial
  2. Starts the webserver.

Delete the simulation:

  1. delete simulation ico-tutorial

Expected behavior:

  1. Stops and deletes all resources created/required by ico-tutorial
  2. Stops the webserver.
  3. Deletes the repo.

Actual behavior: Nothing

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada

Prefix node related packages with node

Description

So that it's clearer which packages relate to which piece of functionality. Similar to how all of the server packages are prefixed with server.

Move creation hooks to server

Description

Currently we chain together creation via cli hooks, e.g. the wallet plugin hooks into create net neo with a post-exec hook create wallet master. This limits the applicability of the hook to only networks created from the CLI. For example, a simulation may programmatically create a network on the server and the master wallet won't be automatically created. Instead, we should add server side create hooks, and only use CLI hooks for CLI-specific functionality, e.g. activating/deactivating wallets/networks.

Node sometimes gets stuck and stops persisting new blocks

Description

I noticed with NEO Tracker that occasionally nodes stop persisting blocks. With some investigation it seems like it might be an issue with the bloom filters. Restarting seems to solve the problem, but also makes it hard to repro. As a short-term fix we should make sure the liveness check works similarly to ready - that is, if we haven't persisted a block, are not currently persisting a block, and are behind other nodes then we should report we're not live. Longer term fix would be to resolve the underlying issue. If it is a problem with the bloom filter, then we should be able to repro by running through all blocks sequentially from the start.

Steps to Reproduce

Unknown

Expected behavior: Blocks should continue to be persisted

Actual behavior: Node stops persisting blocks.

Reproduces how often: Happens every 24-48 hours without a restart.

Versions

v0.0.1

Additional Information

Nada.

describe wallet should work without network specified when it's unambiguous

Description

describe wallet <name> without a network activated or a network argument errors out because it's missing a network. When <name> is unambiguous across networks, we should go ahead and show it.

Steps to Reproduce

  1. create net neo
  2. create wallet foo
  3. deactivate net neo
  4. describe wallet foo

Expected behavior: Describes the foo wallet on the neo network.

Actual behavior: Errors

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada

Project plugin

Description

Simulations work well for bootstrapping new folders and setting up tours. However, once the simulation is setup, there isn't an easy way to modify parameters or update smart contracts and then redeploy. Let's add another plugin, the "project" plugin which looks for a .neo-one.js configuration file in the current working directory and allows users to:

  1. Configure contracts and which networks to deploy contracts to.
  2. Configure (globally defined) networks to use
    a. Also automatically creates missing networks
  3. Re-deploy contracts associated with the project
  4. Re-build contract artifacts.
  5. Update build artifacts like available wallets for private networks automatically based on actual network wallets.
  6. Automatically activate the "default" network when jumping into the cli.

Client APIs polish

Description

  1. Pull Network configuration directly from Node so it's not hardcoded, nor required by clients to provide.
  2. Use standard NEO addressVersion and privateKeyVersion everywhere, optionally allowing user to specify.

Versions

v0.0.1

Add raw bytecode and decompiled bytecode to describe contract

Description

We should enhance describe for compiled smart contracts to include the bytecode and decompiled bytecode.

Steps to Reproduce

  1. create net neo
  2. compile contract foo foo.py --abi foo.json
  3. describe foo

Expected behavior: Shows bytecode and decompiled (human friendly) version of the bytecode.

Actual behavior: Does not show it.

Reproduces how often: 100%

Versions

v0.0.1

Additional Information

Nada.

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.