Skip to content

Instantly share code, notes, and snippets.

View pirapira's full-sized avatar

Yoichi Hirai pirapira

View GitHub Profile
{
"201503110226PYTHON_DUP6" : {
"_info" : {
"comment" : "This test used to be a VM test and it once failed in python client some day. Since the test contains a BALANCE instruction (which must be mocked), it's moved to GeneralSateTest https://github.com/ethereum/tests/pull/445/files#r17\
9426325"
},
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentGasLimit" : "1000000",
~/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>
$ 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 \
@pirapira
pirapira / add.txt
Created May 25, 2018 21:27
evm code that adds two numbers from the storage and writes the result to storage
~/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)))
@pirapira
pirapira / raiden-debug_2018-12-19T10:15:06.632144.log
Last active December 19, 2018 10:48
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"}
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
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"
@pirapira
pirapira / deploy.sh
Created April 1, 2019 08:31
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"
@pirapira
pirapira / fatal.log
Created July 25, 2019 10:06
fatal error in raiden node
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
@pirapira
pirapira / deployment.txt
Created August 27, 2019 11:57
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