Code Monkey home page Code Monkey logo

neo-privatenet-docker's Issues

update to neo-cli 2.9.0

The image is still on 2.7.6 whereas 2.9.0 is out
It would be nice to have a docker image with the latest version that supports things like stack isolation and the map contract parameter

MAC: neopy cmd shows container nut running.

Followed City of Zion instructions for setting up private net and container. ./docker_build.sh does not run on MAC with zion build. Getting errors. Error: private network container doesn't seem to be running, or RPC is not enabled.

Says Linux only. Is the CityofZion project only meant to be running on Windows? If so this should be stated in Prerequisites.

privenet docker_run_and_create_wallet.sh problem

I try to use docker_run_and_create_wallet.sh script. Based on the README it's typical to have some internal errors during its execution.
However I got some errors that seems fatal and prohibit me to use it.
It includes failed to extract from json file and insufficient fund for asset id.

I attach the running log and I will be appreciated if anyone can give me any idea about solving the problem.

Thanks in advance

log.txt

neopy crashed

It crashed by it self ? when I try to run neopy

Traceback (most recent call last):
  File "/usr/local/bin/np-prompt", line 11, in <module>
    load_entry_point('neo-python', 'console_scripts', 'np-prompt')()
  File "/neo-python/neo/bin/prompt.py", line 296, in main
    blockchain = LevelDBBlockchain(settings.chain_leveldb_path)
  File "/neo-python/neo/Implementations/Blockchains/LevelDB/LevelDBBlockchain.py", line 115, in __init__
    raise Exception('Leveldb Unavailable')
Exception: Leveldb Unavailable

Error claiming the NEO and GAS

I was trying to setup a private NEO blockchain using this repository, but I wasn't able to proceed through the create_wallet step. Until that phase everything went as expected, however when I run the script to claim the NEO and GAS I've got the following error:

Starting script to claim NEO and GAS...
docker exec -it neo-privnet python3.5 /opt/neo-python/claim_neo_and_gas.py -o /tmp/wallet -p coz -w /tmp/wif

Traceback (most recent call last):
  File "/opt/neo-python/claim_neo_and_gas.py", line 39, in <module>
    from neo.Wallets.KeyPair import KeyPair
ImportError: No module named 'neo.Wallets.KeyPair'

Copying wallet file and wif key out of Docker container...
Error response from daemon: lstat /var/lib/docker/aufs/mnt/b3c504555eaffe399cba56873972902fce413077832c54845775be7d6b5ba9f8/tmp/wif: no such file or directory
Error response from daemon: lstat /var/lib/docker/aufs/mnt/b3c504555eaffe399cba56873972902fce413077832c54845775be7d6b5ba9f8/tmp/wallet: no such file or directory

--------------------

All done! You now have 2 files in the current directory:

  neo-privnet.wallet .. a wallet you can use with neo-python (pwd: coz)
  neo-privnet.wif ..... a wif private key you can import into other clients

Enjoy!

And none of the files were created.
I suspect, this might be related to recent changes on neo-python such as CityOfZion/neo-python#156

Build docker image, pip3 install problem

Hi,

I'm trying to use the neo privatenet docker and I want to build it by myself.
I run the "docker_build.sh" script. In building the docker image by Dockerfile, during the installation of neo-python module by pip3 process, unfortunately it's halting.

I ran the script on ubuntu-14.04. In the following I attach the log:

Downloading https://files.pythonhosted.org/packages/90/50/4c315ce5d119f67189d1819629cae7908ca0b0a6c572980df5cc6942bc22/Twisted-18.7.0.tar.bz2 (3.1MB)
Downloading from URL https://files.pythonhosted.org/packages/90/50/4c315ce5d119f67189d1819629cae7908ca0b0a6c572980df5cc6942bc22/Twisted-18.7.0.tar.bz2#sha256=95ae985716e8107816d8d0df249d558dbaabb677987cc2ace45272c166b267e4 (from https://pypi.org/simple/twisted/)
Updating cache with response from "https://files.pythonhosted.org/packages/90/50/4c315ce5d119f67189d1819629cae7908ca0b0a6c572980df5cc6942bc22/Twisted-18.7.0.tar.bz2"
Caching due to etag
Running setup.py (path:/tmp/pip-build-ade69cj_/Twisted/setup.py) egg_info for package Twisted
Running command python setup.py egg_info

The script is halting after above log forever !!

Thanks in advance for the reply,
M. Labbaf

Error when running docker_run_and_create_wallet.sh

Hi there.

I try to run my own NEO privnet following instructions from readme.

I have successfully built and run docker container. Then I tried this:
./docker_run_and_create_wallet.sh and got the following error:

Starting container...
6ecdf34e49cfe2187140e01f5ab55a0a011fd7b1098b62d1d0e2289cbc55ba12
Waiting 10 seconds to let consensus nodes start...
Starting script to claim NEO and GAS...
docker exec -it neo-privnet python3.6 /neo-python/claim_neo_and_gas_fixedwallet.py

Traceback (most recent call last):
  File "/neo-python/claim_neo_and_gas_fixedwallet.py", line 46, in <module>
    from neo.Prompt.Commands.Send import construct_and_send
ImportError: cannot import name 'construct_and_send'

Copying wallet file and wif key out of Docker container...
Error: No such container:path: neo-privnet:/tmp/wif

--------------------

All done! You now have 2 files in the current directory:

  neo-privnet.wallet .. a wallet you can use with neo-python (pwd: coz)
  neo-privnet.wif ..... a wif private key you can import into other clients

Enjoy!

After this file neo-privnet.wallet is present in /neo-python directory but there's no neo-privnet.wif file.

And finally I have no NEO and no GAS in the wallet. What I try:

root@neo-privnet:/neo-python# np-prompt -p
Privatenet useragent '/NEO:2.8.0/', nonce: 1092010408
[I 181122 09:22:11 LevelDBBlockchain:112] Created Blockchain DB at /root/.neopython/Chains/privnet 
[I 181122 09:22:11 LevelDBBlockchain:156] Current stored headers empty, re-creating from stored blocks...
[I 181122 09:22:11 NotificationDB:73] Created Notification DB At /root/.neopython/Chains/privnet_notif 
NEO cli. Type 'help' to get started


neo> open wallet neo-privnet.wallet                                                                                                                                                                         
[password]> ***                                                                                                                                                                                             
Opened wallet at neo-privnet.wallet
neo> wallet rebuild                                                                                                                                                                                         
neo> send c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b AZ81H31DMWzbSnFDLFkzh9vHwaDLayV7fU 10                                                                                            
[E 181122 09:22:59 Wallet:1071] insufficient funds for asset id: c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b 
[D 181122 09:22:59 Send:162] insufficient funds

Why this happens? Maybe I do something wrong? How to fix this?

Thank you!

Installation stuck

I'm new to neo developing. I'm trying to pull the privatenet for the first time using
docker pull cityofzion/neo-privatenet
but it's been 5 hours and terminal stuck at extracting. Sorry for my bad English. I am using mac os. Is this normal? or should I restart it?

script docker_wait_and_commit.sh sometimes misses some blocks

Description
This script checks if the current block reached a certain chosen block to trigger all work but sometimes fails and misses the trigger.

How can we reproduce the problem?
The problem occurs sometimes when we use the --until-block option.
The sleep time between iterations is 60 seconds and blocks ~12 seconds. So, we will have almost 6 blocks each iteration.
That could make us fail to trigger the work.

Solution
Decrease the sleep time to 10 seconds when we are using --until-block option.

Mac or Linux instance?

When I do git pull I see that the NEO-Privatenet-docker is for Linux. Is there a MAC instance of neo-privatenet-docker? This instance is causing the ./docker_build.sh command to fail on MAC.

I pulled the Docker image and used it, but I can not synchronize the wallet.

Hello. Please do not hesitate to contact me because my private network connection is not good.

I docker pull Ver: 2.9.1 image and use it.
https://hub.docker.com/r/cityofzion/neo-privatenet?ref=login

After I run the image, I copy the local Smart contract to the container and erase the old block chain data.

docker cp localFilePath / compileSmartContract.avm neo-privatenet: /neo-python/filename.avm
rm -rf /root/.neopython/Chains/privnet*

Then start the interface with the neopy command.

When opening the wallet with the following command and checking the wallet with the wallet command, it seems that it is "percent_synced": 0 "and it is not possible to synchronize the wallet.
open wallet neo-privnet.wallet

Progress of PriveteNet is displayed as 1/1.
If you connect immediately after PC start up, you may be able to synchronize well in rare cases.

Do you know for why this phenomenon is caused? Thank you very much.

neo-privatenet ver: 2.9.1
Docker Desktop ver: Version 2.0.0.0-win81 (29211)
OS: Windows10

wallet is not sync.

Even when connecting to privatenet executed by docker, the index of the block does not change from 1/1.
"Current stored headers empty." Is displayed. What is the cause?
pn

Error when running on Fedora 30

Description

neo-python can't connect to the container running neo-privatenet-docker, producing the following error:

[E 190624 10:16:25 prompt:273] Error: private network container doesn't seem to be running, or RPC is not enabled.

Reproduction steps

Follow the steps outlined in https://hub.docker.com/r/cityofzion/neo-python/ on Fedora 30, running the following:

# Pull the latest images from Docker hub
docker pull cityofzion/neo-python
docker pull cityofzion/neo-privatenet

# Start the private network container. Maps the current working directory on the host into 
# `/neo-python/sc/` and exposes the ports.
docker run --rm -d --name neo-privatenet -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet

# Start the neo-python container
docker run --rm -it --net=host -v $(pwd):/neo-python/sc -h neo-python --name neo-python cityofzion/neo-python /bin/bash

# Start neo-python
np-prompt -p -v

Details

Full shell output

Line breaks added to increase readability

[corollari@localhost neo-priv]$ docker pull cityofzion/neo-python
Using default tag: latest
latest: Pulling from cityofzion/neo-python
Digest: sha256:b4a8a830e64b761c5c54c6d96bcc5251ff9795d2106e5a78f001ac06b1a70fdc
Status: Image is up to date for cityofzion/neo-python:latest

[corollari@localhost neo-priv]$ docker pull cityofzion/neo-privatenet
Using default tag: latest
latest: Pulling from cityofzion/neo-privatenet
Digest: sha256:3d1ae4149dc68e9a9155d0c8081d55bf49e7fa614e275d137850ff1b7f0073f7
Status: Image is up to date for cityofzion/neo-privatenet:latest

[corollari@localhost neo-priv]$ docker run --rm -d --name neo-privatenet -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet
0b92e13483bd6c69ae343fe3e0ca2e3cf6f69d67ff42e5b796b76c58978df924

[corollari@localhost neo-priv]$ docker run --rm -it --net=host -v $(pwd):/neo-python/sc -h neo-python --name neo-python cityofzion/neo-python /bin/bash

root@neo-python:/neo-python# np-prompt -p -v
[E 190624 10:16:25 prompt:273] Error: private network container doesn't seem to be running, or RPC is not enabled.

root@neo-python:/neo-python#

docker-ps output

CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                                                        NAMES
46e3ab0b351a        cityofzion/neo-python       "/bin/bash"              16 minutes ago      Up 16 minutes                                                                                    neo-python
0b92e13483bd        cityofzion/neo-privatenet   "/bin/bash /opt/run_…"   17 minutes ago      Up 17 minutes       0.0.0.0:20333-20336->20333-20336/tcp, 0.0.0.0:30333-30336->30333-30336/tcp   neo-privatenet

Versions

Docker: version 18.06.3, build d7080c1
OS: Fedora 30 (linux kernel 4.20.16-200.fc29.x86_64)

Notes

I came across this problem when debugging a downstream issue (see CityOfZion/neo-local#178) that I think is directly caused by this error.

The problem I'm seeing could also be caused by something in neo-python, but based on my testing I think the root cause is in neo-privatenet-docker. Still, I could be wrong, so if you think the issue is caused by something else just tell me and I'll transfer the issue.

Could not find a version that satisfies the requirement neo-boa==0.3.3

While running

$ ./docker_build.sh

I ran into the problem below:

Collecting neo-boa==0.3.3 (from -r /opt/neo-python/requirements.txt (line 35))

Could not find a version that satisfies the requirement neo-boa==0.3.3 (from -r /opt/neo-python/requirements.txt (line 35)) (from versions: 0.1.5, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2) No matching distribution found for neo-boa==0.3.3 (from -r /opt/neo-python/requirements.txt (line 35))

The command '/bin/sh -c pip3 install -r /opt/neo-python/requirements.txt' returned a non-zero code: 1

claim script incompatible with new neo-python release

The claim_neo_and_gas script doesn't work anymore with the new neo-python release. Here's the claim script: https://github.com/CityOfZion/neo-privatenet-docker/blob/master/scripts/claim_neo_and_gas_fixedwallet.py

The error is

Traceback (most recent call last):
  File "/neo-python/claim_neo_and_gas_fixedwallet.py", line 43, in <module>
    from neo.Prompt.Commands.LoadSmartContract import ImportMultiSigContractAddr
ImportError: cannot import name 'ImportMultiSigContractAddr'

Currently I've updated the Dockerfile to use neo-python v0.8.2. If you want to work at this, comment this line to use the master branch of neo-python.

neo-cli v2.5.0+ doesn't create blocks anymore

This issue is for tracking the current issue that neo-cli >= v2.5.0 doesn't create blocks anymore.

This is the output of neo-cli version 2.4.1 (current in this master branch, and last neo-cli version that works):

$ ./docker_build.sh

$ ./docker_run.sh
Starting container...
f76bb5849ead5f991b90cfe9f05aef182df6637aa700a3f422cb6bbe6f5bdcb1

$ docker exec -it neo-privnet /bin/bash

root@neo-privnet:/# screen -ls
There are screens on:
    39.node4	(12/14/17 15:12:26)	(Detached)
    26.node3	(12/14/17 15:12:26)	(Detached)
    11.node2	(12/14/17 15:12:26)	(Detached)
    8.node1	(12/14/17 15:12:26)	(Detached)
4 Sockets in /var/run/screen/S-root.
root@neo-privnet:/# screen -d -r 11.node2

This is the output inside the screen:

spawn dotnet neo-cli.dll --rpc
NEO-CLI Version: 2.4.1.0

neo> open wallet wallet2.db3
open wallet wallet2.db3
password: two
***
neo> start consensus
start consensus
[15:14:06] OnStart
[15:14:06] initialize: height=1 view=0 index=0 role=Backup
[15:14:11] OnPrepareRequestReceived: height=1 view=0 index=1 tx=1
[15:14:11] send perpare response
[15:14:11] OnPrepareResponseReceived: height=1 view=0 index=2
[15:14:11] relay block: 0xa868990dc63031d2fc12ff344778e88341461ccd187f1e876a69ad511121af96
[15:14:11] persist block: 0xa868990dc63031d2fc12ff344778e88341461ccd187f1e876a69ad511121af96
[15:14:11] initialize: height=2 view=0 index=0 role=Backup

When running the latest neo-cli (eg neo-cli 2.5.2 from this branch: https://github.com/CityOfZion/neo-privatenet-docker/tree/252), with the same initial commands as above, this is the output inside the screen:

spawn dotnet neo-cli.dll --rpc
NEO-CLI Version: 2.5.2.0

neo> open wallet wallet2.db3
open wallet wallet2.db3
password: ***
neo> start consensus
[11:03:36] OnStart

And it just hangs there without generating blocks.

No connected peers

I get an No connected peers-error by neo-python, when sending mulitple smart-contract invocation per second.
Current Behaviour:
i send multiple invocations per second and after 2 minutes or so i get for a few seconds no connected peers and after that all invocations are successfull again. No matter how much invocations i send per second it always occures in the same pattern. What could be the reason to this?

I am connected to a remote server where my docker-container is running and i send them with a python script in the neo-python venv.

The used Pyhton script for sending the Invocation can be find here:
https://github.com/TimRi91/Distributed-Ledger-Testbench/blob/master/NEO/kvstore-workloadclient.py

Block height cannot increase

I am trying to setup private neo blockchain using this repository but create_wallet step doesn't work. Until that phase everything went as expected but it prints Waiting for wallet to sync.. message to screen for hours. I have no idea how to solve this problem. Unfortunately, there is no meaningful message for the issue.

Any help or suggestion would be appreciated. Thank you!

TODO: Isolate a node in just one small container

  • Description:
    Install only one node in a single container and get rid of all possible stuff around.

  • Objective
    To have a really small docker image, that can be used after with docker compose.

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.