Skip to content

Instantly share code, notes, and snippets.

View gist:d21976f12b0da2fe4c7c
contract Bank {
address owner;
mapping (address => uint) balances;
function init() returns(bool){
owner = tx.origin;
View deploy.js
var solc = require('solc');
var fs = require('fs');
var Web3 = require('web3');
const assert = require('assert');
var web3;
if(typeof web3 !== 'undefined')
web3 = new Web3(web3.currentProvider);
else
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:4000/"));
View mapping_contract.sol
pragma solidity ^0.4.2;
contract Account{
int public variableAB;
int public variableBA;
int public balanceAB;
function Account(int variableAB, int variableBA){
variableAB = variableAB;
variableBA = variableBA;
}
View zing_chart_gist
{
"graphset":[
{
"type":"area",
"title":{
"text":"Market Depth",
"font-size":14,
"offset-x":-200,
"offset-y":-10
},
View gethprivate
Initialising
geth --identity "SohanNode" --rpc --rpccorsdomain "*" --datadir ~/privategeth --port "30303" --nodiscover --networkid 2018 init ~/privategeth/genesis.json
Starting
geth --identity "SohanNode" --rpc --rpccorsdomain "*" --datadir ~/privategeth --port "30303" --nodiscover --networkid 2018 --maxpeers 0 mine
genesis.json
{
"coinbase" : "0x67f49edf9b0f230f069f20dbcf2c9d55bebe74bd",
View gethOutofMemory14Feb2018
pi@raspberrypi:~/go-ethereum $ make geth
build/env.sh go run build/ci.go install ./cmd/geth
>>> /usr/local/go/bin/go install -ldflags -X main.gitCommit=0544a43c1332871405b260432db4bfe6a591feee -v ./cmd/geth
github.com/ethereum/go-ethereum/common/hexutil
github.com/ethereum/go-ethereum/crypto/sha3
github.com/ethereum/go-ethereum/common/math
github.com/ethereum/go-ethereum/rlp
github.com/ethereum/go-ethereum/crypto/secp256k1
github.com/ethereum/go-ethereum/vendor/github.com/go-stack/stack
github.com/ethereum/go-ethereum/common
View concurrentmapreadwriteError
INFO [02-14|11:40:43] Imported new block headers count=1 elapsed=38.528ms number=2649862 hash=e05e27…befc80 ignored=0
INFO [02-14|11:40:51] Imported new block headers count=1 elapsed=37.712ms number=2649863 hash=3e175b…68c6a1 ignored=0
fatal error: concurrent map read and map write
goroutine 3 [running]:
runtime.throw(0x9889ff, 0x21)
/usr/local/go/src/runtime/panic.go:605 +0x70 fp=0x12da4d80 sp=0x12da4d74 pc=0x4f840
runtime.mapaccess1(0x88a5e8, 0x1372ca00, 0x12da4db4, 0x136ee20c)
/usr/local/go/src/runtime/hashmap.go:355 +0x228 fp=0x12da4da0 sp=0x12da4d80 pc=0x2ac80
github.com/ethereum/go-ethereum/les.(*lightFetcher).nextRequest.func2(0xf62ff0, 0x12e9e600, 0x12da4e64)
View segmentation_fault_parity
2018-09-24 21:44:44 Stage 2 block verification failed for 0x970b…29fe: Error(Block(MismatchedH256SealElement(Mismatch { expected: 0xe66625d8b25d16ff20ee4e009894c82a129c1f47277179df2f93d789b66803a4, found: 0x737741e8733b86a3acb2b782093d3f9b5531e5fa4930d9a4840cc1619ea47d6e })), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
2018-09-24 21:44:44 Stage 2 block verification failed for 0xde1e…6d06: Error(Block(MismatchedH256SealElement(Mismatch { expected: 0xa2bf6c0ec9e105daa94b0b49890021230ffc776474140cc2271ad070d2b20c26, found: 0x3afce89df76b8789ac4d35d973a55425d6abe9344ad2e0e1844869e8151ca1b5 })), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
2018-09-24 21:44:44 Stage 2 block verification failed for 0x94b5…b6f7: Error(Block(MismatchedH256SealElement(Mismatch { expected: 0x718e984a05a9d01eb6387e8c3dc65efe918298fd079aac5aba4324327dfee388, found: 0x94c2ee4444beb7ade244d22fe51a5749918298fd079aac5aba4324327dfee388 })), State { next_error: None, backtrac
View persistent_database_corruptions_parity
2018-09-24 18:50:51 Syncing #278455 0xbfa0…767a 65.04 blk/s 254.9 tx/s 24 Mgas/s 0+ 9446 Qed #287902 25/25 peers 6 MiB chain 96 MiB db 46 MiB queue 9 MiB sync RPC: 0 conn, 0 req/s, 76 µs
2018-09-24 18:51:03 Syncing #279101 0xa45e…a05a 53.09 blk/s 176.0 tx/s 22 Mgas/s 0+ 8798 Qed #287902 25/25 peers 5 MiB chain 96 MiB db 42 MiB queue 9 MiB sync RPC: 0 conn, 0 req/s, 76 µs
2018-09-24 18:51:09 Syncing #279803 0x5a19…8c40 106.46 blk/s 321.7 tx/s 21 Mgas/s 0+ 8152 Qed #287956 25/25 peers 5 MiB chain 97 MiB db 40 MiB queue 9 MiB sync RPC: 0 conn, 0 req/s, 76 µs
2018-09-24 18:51:15 Syncing #280449 0xc1e3…21c6 112.58 blk/s 340.7 tx/s 18 Mgas/s 0+ 7941 Qed #288393 24/25 peers 5 MiB chain 97 MiB db 41 MiB queue 12 MiB sync RPC: 0 conn, 0 req/s, 76 µs
2018-09-24 18:51:29 Syncing #281144 0x47b8…c6cb 49.64 blk/s 153.6 tx/s 9 Mgas/s 0+ 9095 Qed #290243 25/25 peers 5 MiB chain 97 MiB db 45 MiB queue 10 M