Skip to content

Instantly share code, notes, and snippets.

View alexvanin's full-sized avatar

Alex Vanin alexvanin

View GitHub Profile
@alexvanin
alexvanin / cgi_l1.asm
Created October 26, 2015 17:27
CGI lab. work : lines and circles (Bresenham algo) in assembly code.
;-- Created by Alexey Vanin, 25.10.2015
;---------------------------------------------
;-- Assembly code for lab. work : CG course
;-- Drawing cube and filled-circle inside
;-- Used Bresenham line & circle algorythms
;-- Filling with inline method
.model small
.stack 1024
.data
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import random
import hashlib
from time import sleep
#For working with http server
from BaseHTTPServer import *
# cat /opt/node/neo-cli/protocol.json | grep "SecondsPerBlock"
"SecondsPerBlock": 4,
# cat /opt/node/neo-cli/Plugins/SimplePolicy/config.json | grep "MaxTransactionsPerBlock"
"MaxTransactionsPerBlock": 500,
root@4330b5a6b0ab:/neo-python/scripts# ./tx-gen.py -n 10
Privatenet useragent '/Neo:2.9.4/', nonce: 856199433
[I 190319 13:16:08 Settings:331] Created 'Chains' directory at /root/.neopython/Chains
[I 190319 13:16:09 LevelDBBlockchain:112] Created Blockchain DB at /root/.neopython/Chains/privnet
[I 190319 13:16:09 tx-gen:215] ...awaits 0/0
[I 190319 13:17:35 tx-gen:215] ...awaits 6246/6516
[I 190319 13:17:37 tx-gen:221] Syncronized. Height 6516 Now open wallet:
[I 190319 13:17:37 tx-gen:231] Wallet opened
[I 190319 13:17:42 tx-gen:131] Constructing NEO : 0-9
Sending 10.0 NEO from AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y to AJfUYsPJuaurA9f6RB2DVKhV6PmRp8DrdS
root@4330b5a6b0ab:/neo-python/scripts# cp /root/raw.txs ./
root@4330b5a6b0ab:/neo-python/scripts# exit 0
neo-bench$ sed -i 's/PRIVNET_IMAGE.*/PRIVNET_IMAGE=neo-bench:0.0.1/' .env
neo-bench$ make env-up
Start privnet
Creating network "neo-bench_inside" with the default driver
Creating network "neo-bench_host-exposed" with driver "bridge"
Creating neo-cli-privatenet-3 ... done
Creating neo-cli-privatenet-1 ... done
Creating neo-cli-privatenet-4 ... done
Creating neo-cli-privatenet-2 ... done
neo-bench/scripts$ ./getblock.py 6820
6820 1
6821 1 10
6822 1 10
6823 1 11
6824 1 10
6825 1 10
6826 1 10
6827 1 10
6828 1 11
rpc-raw-generator$ cp ../neo-bench/scripts/raw.txs ./raw
rpc-raw-generator$ make up
Stop container
Error response from daemon: No such container: neo-raw-generator
Error: No such container: neo-raw-generator
enter inside container:
/var/test # rpc-generator --help
Usage of rpc-generator:
neo-bench$ docker ps | grep neo-cli-privatenet-1
f5f56e5056bc cityofzion/neo-local-privatenet:2.9.4_6kBlocks "/bin/bash /opt/run.…" 22 minutes ago Up 22 minutes (healthy) 0.0.0.0:20333->20333/tcp, 20336/tcp, 0.0.0.0:30333->30333/tcp, 30336/tcp neo-cli-privatenet-1
neo-bench$ docker commit f5f56e5056bc neo-bench:0.0.1
sha256:bfd4cd87688e4cd0dfd9f1bbdc1f9c6ff140496f7be53f94964a32d852191595
neo-bench$ make down
Stop environment
Stopping neo-python ... done
Stopping neo-cli-privatenet-2 ... done