Skip to content

Instantly share code, notes, and snippets.

Avatar

Oliver Bünting eorituz

  • Brainbot Technologies AG
View GitHub Profile
View mockchain.py
import collections
import random
import json
import hashlib
def hexhash(x):
return '0x' + hashlib.sha224(str(x).encode('ASCII', errors='backslashreplace')).hexdigest()[:6]
View aca-py error
```
pi@raspberrypi:~ $ docker run eorituz/aries-cloudagent:py36-1.14-1_0.5.1 start --admin '0.0.0.0' 5020 -e 10.1.7.64:10000 --wallet-type indy --genesis-url http://test.bcovrin.vonx.io/genesis --label 'seller Agent' --auto-accept-invites --auto-accept-requests --admin-insecure-mode --log-level DEBUG --genesis-url http://test.bcovrin.vonx.io/genesis -it http '0.0.0.0' 10000 -ot http
2020-06-26 08:37:58,980 asyncio DEBUG Using selector: EpollSelector
2020-06-26 08:37:58,988 aries_cloudagent.core.plugin_registry DEBUG Loaded module: aries_cloudagent.protocols.introduction
2020-06-26 08:37:58,991 aries_cloudagent.core.plugin_registry DEBUG Loaded module: aries_cloudagent.protocols.basicmessage
2020-06-26 08:37:58,993 aries_cloudagent.core.plugin_registry DEBUG Loaded module: aries_cloudagent.protocols.problem_report
2020-06-26 08:37:58,995 aries_cloudagent.core.plugin_registry DEBUG Loaded module: aries_cloudagent.protocols.routing
2020-06-26 08:37:58,997 aries_cloudagent.core.plugin_registry DEBUG Loaded module
View CustomErc20Token.sol
pragma solidity 0.5.4;
/*
This Token Contract implements the standard token functionality (https://github.com/ethereum/EIPs/issues/20), the ERC223 functionality (https://github.com/ethereum/EIPs/issues/223) as well as the following OPTIONAL extras intended for use by humans.
In other words. This is intended for deployment in something like a Token Factory or Mist wallet, and then used by humans.
Imagine coins, currencies, shares, voting weight, etc.
Machine-based, rapid creation of many tokens would not necessarily need these extra features or will be minted in other manners.
1) Initial Finite Supply (upon creation one specifies how much is minted).
2) In the absence of a token registry: Optional Decimal, Symbol & Name.
.*/
View nodelib_changes.py
"""Runs NEAR core inside the docker container for isolation and easy update with Watchtower."""
def run_docker(image, home_dir, boot_nodes, telemetry_url, verbose):
print("Starting NEAR client and Watchtower dockers...")
docker_stop_if_exists('nearcore_24568')
docker_stop_if_exists('watchtower_3031')
# Start nearcore container, mapping home folder and ports.
envs = ['-e', 'BOOT_NODES=%s' % boot_nodes, '-e', 'TELEMETRY_URL=%s' % telemetry_url]
rpc_port = get_port(home_dir, 'rpc')
network_port = get_port(home_dir, 'network')
if verbose:
@eorituz
eorituz / Raiden_Receiver_Node.log
Created September 13, 2018 12:00
The Log files of the Raiden node which received the Tx
View Raiden_Receiver_Node.log
2018-09-13 11:52:23 [debug ] STATE CHANGE [raiden.raiden_service] node=002857f3 state_change=<ActionChangeNodeNetworkState node:00f3ff78 state:reachable>
2018-09-13 11:52:24 [info ] Missing gas reserve [raiden.tasks] required_wei=3284842000000000
2018-09-13 11:52:29 [debug ] new block [raiden.tasks] number=4030876
2018-09-13 11:52:30 [debug ] STATE CHANGE [raiden.raiden_service] node=002857f3 state_change=<Block 4030876>
2018-09-13 11:52:30 [debug ] new block [raiden.tasks] number=4030877
2018-09-13 11:52:31 [debug ] STATE CHANGE [raiden.raiden_service] node=002857f3 state_change=<Block 4030877>
2018-09-13 11:52:38 [debug ] new block [raiden.tasks] number=4030878
2018-09-13 11:52:38 [debug ] STATE CHANGE [raiden.raiden_service] node=002857f3 state_change=<Block 4030878>
2018-09-13 11:52:38 [debug ] MESSAGE_DATA [raiden.n
@eorituz
eorituz / Raiden_Sender_Node.log
Created September 13, 2018 11:57
The Log files of the Raiden node which the Tx Sender uses
View Raiden_Sender_Node.log
2018-09-13 11:52:35 [debug ] STATE CHANGE [raiden.raiden_service] node=00f3ff78 state_change=<ActionChangeNodeNetworkState node:00b349e9 state:unreachable>
2018-09-13 11:52:37 [debug ] new block [raiden.tasks] number=4030878
2018-09-13 11:52:38 [debug ] STATE CHANGE [raiden.raiden_service] node=00f3ff78 state_change=<Block 4030878>
2018-09-13 11:52:38 [debug ] Initiating payment [raiden.api.rest] amount=1 payment_identifier=2 registry_address=0xf2a175A52Bd3c815eD7500c765bA19652AB89B30 target_address=0x002857f3a3BEa9DC0301D6DCf573692720f88B5a token_address=0x0f114A1E9Db192502E7856309cc899952b3db1ED
2018-09-13 11:52:38 [debug ] initiating transfer [raiden.api.python] amount=1 identifier=2 initiator=00f3ff78 target=002857f3 token=0f114a1e
2018-09-13 11:52:38 [info ] channel doesnt have enough funds, ignoring [raiden.routing] amount=1 distributable=0 from_address=00f3ff78 partner_address=008135fa
2018-09-13 11:52:38