Skip to content

Instantly share code, notes, and snippets.

Yoichi Hirai pirapira

Block or report user

Report or block pirapira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pirapira
pirapira / raiden-debug_2019-07-25T09:40:33.055353.log
Created Aug 30, 2019
raiden-debug_2019-07-25T09:40:33.055353.log
View raiden-debug_2019-07-25T09:40:33.055353.log
This file has been truncated, but you can view the full file.
{"raiden": "0.100.5.dev113+g2ba85cbee", "raiden_db_version": 23, "python_implementation": "CPython", "python_version": "3.7.4", "system": "Linux 64bit_ELF 5.0.0-21-generic", "architecture": "x86_64", "distribution": "bundled", "event": "Starting Raiden", "logger": "raiden.ui.runners", "level": "info", "timestamp": "2019-07-25 09:40:33.074475"}
{"config_file": "/home/yoichi/.local/share/raiden/config-16fa85f3a477b95c7180209b25ef0291ade95e3f-goerli.toml", "event": "Using config file", "logger": "raiden.ui.runners", "level": "debug", "timestamp": "2019-07-25 09:40:33.075235"}
{"node": "0x16Fa85F3a477B95c7180209B25ef0291ade95e3F", "available_nonce": 3, "client": "Geth/v1.8.23-omnibus-2ad89aaa/linux-amd64/go1.11.1", "event": "JSONRPCClient created", "logger": "raiden.network.rpc.client", "level": "debug", "timestamp": "2019-07-25 09:40:34.502762"}
View deployment.txt
export GOERLI=http://geth.goerli.ethnodes.brainbot.com:8545
export GOERLIPRIV=/home/yoichi/.ethereum/goerli/keystore/UTC--2019-02-18T14-56-34.781524237Z--6c5c227036a1d159c19f17316e5d0f0a52d84d5c
export MAX_UINT256=115792089237316195423570985008687907853269984665640564039457584007913129639935
let "seconds_per_day=60*60*24"
let "decay=200*$seconds_per_day"
let "duration=200*$seconds_per_day"
export Deposit=2000000000000000000000
python -m raiden_contracts.deploy raiden --rpc-provider $GOERLI --private-key $GOERLIPRIV --gas-price 20 --gas-limit 6000000 --max-token-networks $MAX_UINT256 --secret-registry-from-deployment-file raiden_contracts/data_0.21.0/deployment_goerli.json
@pirapira
pirapira / fatal.log
Created Jul 25, 2019
fatal error in raiden node
View fatal.log
2019-07-25 10:03:29.719679 [info ] 127.0.0.1 - - [2019-07-25 12:03:29] "GET /api/v1/channels HTTP/1.1" 200 1707 0.003652 [raiden.api.rest.pywsgi]
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "raiden/connection_manager.py", line 322, in _join_partner
File "raiden/api/python.py", line 610, in set_total_channel_deposit
ValueError: Channel is not in an open state.
2019-07-25T10:03:31Z <Greenlet "Greenlet-5" at 0x7f687a813830: <bound method ConnectionManager._join_partner of ConnectionManager(target=3 channels=1:[NettingChannelState(canonical_identifier=CanonicalIdentifier(chain_identifier=5, token_network_address=b'\xf5\xd6T\xf8\xfc`\x91\x17\xe9\xcew\xb0\x97\x98\xee\t\xe4\x7f;\x97', channel_identifier=10), open_transaction=TransactionExecutionStatus(started_block_number=None, finished_block_number=1001986, result='success'), close_transaction=None, settle_transaction=None, update_transaction=None)])>(b'VGl\x08\xcf\x0c0^\x03L\xbb\xbb\x
View deploy.sh
#private_key=/Users/admin/xud-eth/blkchain1/keystore/UTC--2019-02-04T14-57-25.251612000Z--b9a2c5e9cd48a5284698a1aff76b0b20b5757305
#/home/offerm/xud-eth/chaindata/keystore/UTC--2019-01-07T17-32-09.575657568Z--15beaee1233557a83110cc5d7be956e4e3658e7a
source ~/.virtualenvs/offerm-script/bin/activate
version="0.10.1" #"" #"0.4.0" #"0.3._"
provider="http://127.0.0.1:8545"
View 0.10.1deployment.txt
kovan
export KOVAN=http://localhost:8545
export KOPRIV=/home/yoichi/import/parity/keys/kovan/UTC--2019-01-08T17-09-24Z--fcf0e5e3-7d74-7abc-773e-a2ccab085547
export MAX_UINT256=115792089237316195423570985008687907853269984665640564039457584007913129639935
python -m raiden_contracts.deploy raiden --rpc-provider $KOVAN --private-key $KOPRIV --gas-price 11 --gas-limit 6000000 --max-token-networks $MAX_UINT256
"TokenNetworkRegistry": "0x980e5c79780198FcCFE5c937452abF0a1716411f"
View gist:d838d902db9df127c8ea972ae08013fd
pragma solidity ^0.5.2;
/// @title Utils
/// @notice Utils contract for various helpers used by the Raiden Network smart
/// contracts.
contract Utils {
string constant public contract_version = "0.5.0";
/// @notice Check if a contract exists
/// @param contract_address The address to check whether a contract is
@pirapira
pirapira / raiden-debug_2018-12-19T10:15:06.632144.log
Last active Dec 19, 2018
raiden-debug_2018-12-19T10:15:06.632144.log
View raiden-debug_2018-12-19T10:15:06.632144.log
{"raiden": "0.19.1.dev44+gaf0eaa6f", "python_implementation": "CPython", "python_version": "3.6.7", "system": "Linux 64bit_ELF 4.15.0-42-generic x86_64", "distribution": "bundled", "event": "Starting Raiden", "logger": "raiden.ui.runners", "level": "info", "timestamp": "2018-12-19 10:15:06.886954"}
@pirapira
pirapira / add.txt
Created May 25, 2018
evm code that adds two numbers from the storage and writes the result to storage
View add.txt
~/src/solidity/build((v0.4.21)) $ lllc/lllc < ../../cpp-ethereum/build-tsan/add-storage.lll
60015460005401600255
~/src/solidity/build((v0.4.21)) $ cat ../../cpp-ethereum/build-tsan/add-storage.lll
(sstore 2 (+ (sload 0) (sload 1)))
View gist:111de0b0d4f6c29c2d2b40c456d8dc75
$ make
<snip>
eval $(opam config env) \
&& /home/yh/tmp/evm-semantics/.build/k/k-distribution/target/release/k/bin/kompile --debug --main-module ETHEREUM-SIMULATION \
--syntax-module ETHEREUM-SIMULATION .build/ocaml/driver.k --directory .build/ocaml \
--hook-namespaces KRYPTO --gen-ml-only -O3 --non-strict \
&& ocamlfind opt -c .build/ocaml/driver-kompiled/constants.ml -package gmp -package zarith \
&& ocamlfind opt -c -I .build/ocaml/driver-kompiled KRYPTO.ml -package cryptokit -package secp256k1 -package bn128 \
&& ocamlfind opt -a -o semantics.cmxa KRYPTO.cmx \
&& ocamlfind remove ethereum-semantics-plugin \
View gist:1dd72a668905a2e109f82417524211e4
~/src/evm-semantics(exception-checker) $ ./kevm bugcheck tests/interactive/bug-checker/invalid-opcode.evm
== bug-checking: tests/interactive/bug-checker/invalid-opcode.evm
(error "line 12 column 35: Sorts Int and KItem are incompatible")
(error "line 12 column 35: Sorts Int and KItem are incompatible")
(error "line 13 column 35: Sorts Int and KItem are incompatible")
(error "line 13 column 35: Sorts Int and KItem are incompatible")
(error "line 13 column 35: Sorts Int and KItem are incompatible")
#accountExists ( V0 ) ==K true #And
Result ==K <generatedTop>
<k>
You can’t perform that action at this time.