Skip to content

Instantly share code, notes, and snippets.

View emizzle's full-sized avatar

Eric emizzle

View GitHub Profile
@emizzle
emizzle / nimbus_beacon_node.log
Last active July 6, 2021 07:18
Validator 5921, successfully attested slot 1560858, but missed the next one 1560864
{"lvl":"INF","ts":"2021-07-06 16:51:59.000+10:00","msg":"Slot start","topics":"beacnde","tid":1243068,"file":"nimbus_beacon_node.nim:988","lastSlot":1560857,"wallSlot":1560858,"delay":"163us908ns","peers":160,"head":"fe67a2b5:1560857","headEpoch":48776,"finalized":"72fa84c0:1560768","finalizedEpoch":48774,"sync":"synced"}
{"lvl":"NOT","ts":"2021-07-06 16:52:00.127+10:00","msg":"Attestation sent","topics":"beacval","tid":1243068,"file":"validator_duties.nim:246","attestation":{"aggregation_bits":"0x0000000000000000000000000000010001","data":{"slot":1560858,"index":8,"beacon_block_root":"bf65c2e8","source":"48775:b564e103","target":"48776:172e7a2f"},"signature":"b616bf97"},"validator":"91d23ba0","delay":"-2s872ms810us761ns","indexInCommittee":112}
{"lvl":"NOT","ts":"2021-07-06 16:52:07.007+10:00","msg":"Aggregated attestation sent","topics":"beacval","tid":1243068,"file":"validator_duties.nim:571","attestation":{"aggregation_bits":"0xffffffffffffffbfffffffffffffffff01","data":{"slot":1560858,"index":8,"beacon_b
@emizzle
emizzle / slides_ping_pong.nim
Last active March 2, 2021 04:29
Nim task runner simple ping pong use case
import chronicles, chronos, task_runner
type
ThreadArg = object
chanRecv: AsyncChannel[ThreadSafeString]
chanSend: AsyncChannel[ThreadSafeString]
# forward declarations
proc worker(arg: ThreadArg) {.async.}
proc workerThread(arg: ThreadArg) {.thread.}
@emizzle
emizzle / gist:28cf8cde2bc6224a6d31acf93a925aac
Last active September 25, 2020 08:54
status-go bugfix 2027 test

Using Beta.1

  1. Cleared data dir (~/Library/Application Support/Status/data)
  2. Start app, contents of data dir before creating account:
-rw-r--r--  1 emizzle  staff   4.0K 25 Sep 18:34 accounts.sql
-rw-r--r--  1 emizzle  staff    32K 25 Sep 18:34 accounts.sql-shm
-rw-r--r--  1 emizzle  staff    40K 25 Sep 18:34 accounts.sql-wal
drwxr-xr-x  2 emizzle  staff    64B 25 Sep 18:34 keystore
drwxr-xr-x  3 emizzle  staff    96B 25 Sep 18:34 qt
@emizzle
emizzle / README.md
Last active February 7, 2020 02:11
Generate cnonce and hash for an authenticated Embark API request (ie through Postman)

INSTRUCTIONS

  1. Get token from Embark, and paste in token variable below. Be sure to also update the API method and path.

  2. Run this code in RunKit with the keccakjs package

  3. Include the credentials in a raw JSON body with Embark's token (from step 1), ie

{
    "credentials": {
"host": "localhost:55555",
@emizzle
emizzle / Embark install instructions.md
Last active May 30, 2019 03:54
Embark install instructions

Embark Installation

There are several components to installing Embark. This is due to Embark bringing together many different tools to help developers build DApps more easily.

Prerequisites

The following should be installed prior to installing Embark. Version check information and installation instructions are detailed in the sections below, and more information is available in the Embark installation documentation.

  1. NodeJS >= 8.12
  2. Compiler (GCC)
  3. Python version 2 (>= 2.7.16 && < 3)
  4. Go-Ethereum Client (Geth) >= 1.8.17
  5. IPFS &gt;= 0.4.20
did:muport:Qmam6yqLHyoyV4oRbRXyeqhroEgS3hbn7HeckWKMzG7E3s
@emizzle
emizzle / log.txt
Created February 11, 2019 21:40
yarn reboot log
 ~/Code/__Gi../embk../embark    fix/tests-monorepo-vm2-recursive-imports  1  1  104  yarn reboot:full
yarn run v1.12.3
$ npm run reset:full && yarn install
> root@ reset:full /Users/emizzle/Code/__Github/embk-fw/embark
> npx npm-run-all reset reset:top
npx: installed 58 in 14.919s
> root@ reset /Users/emizzle/Code/__Github/embk-fw/embark
@emizzle
emizzle / package.json
Created January 29, 2019 01:50
VSCode debug npm script (in the dApp package.json)
"scripts": {
"embark": "node ../../bin/embark",
"test": "npm run embark test",
"test-debug": "node --inspect-brk=9229 ../../bin/embark test"
},
@emizzle
emizzle / dist_lib_modules_tests_test.js
Last active January 23, 2019 01:48
register VM EmbarkJS
"use strict";
var _interopRequireWildcard = require("@babel/runtime-corejs2/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
var _setPrototypeOf = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/set-prototype-of"));
var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
@emizzle
emizzle / config
Created January 9, 2019 03:11
Default IPFS v0.4.18 config
{
"Identity": {
"PeerID": "Qme4x8D2roF8fHCZXLpTDbFbq3VYCH2JW7XkchozruwwzF",
"PrivKey": "CAASpwkwggSjAgEAAoIBAQDe1UcS1OFnoj7LkaFAPINFetdO+WsGX+ZWOqjVVfxOqMF6LAaSnnedatQARw3Ot1akg73D0PLvHNIsmwXoE5UCE00G3VGJHVDa9t+Eo5uG5+GSXH3T3XU7xIGlvmPZ+htOmbSZKSMDg8NX2YevxwwVpGVyjKg+YQgZYF3MLUAbOAxV8jADYtg+bqA1a5m0rfX0lSkKDCNo4y45ggXd6OzAhLQ6v83jGkendAmfCAGq/UNAS51gSgdFGBuBXVNPtc57NjWpMZ44sFk0IbnrEjmSAP1bU3ZIJBFhdabNzJdnIRC1Cwa4CT02wfIJjT3E/tGyGzL0A4qcg28ssEJ+To/lAgMBAAECggEBAMO9s+Y97Bbd9a1aqrxDq8h/xNyRykraOPqsIpzsIGt0YCiSvd9Tpp04NyxbPizE7i4rr6lwRcZ3mcQnFUQs12rwS2xpQ3NftiPyUpwwH7GcxZCNANb4JUAwOPbATPQweIZODM+xzBkNSK5F3qQxBFOKirbaCfxpvfSUqzBs23BL4yS39eNuJ7ugVo4hE6XJf8VRaL1N0pzTTy0O9ocuQmLLTW52n0Se5eGtDzq1p2tyhPt7Or+l4QPEQoHp4CMsFlQQ8xtZ3r9aNefoR3LIfpeZfZ7bVCTPPq/yWurRjOx5hgeuTCpggV9cEZ7drEAAAzHzvLKmUOjy8gfCpSC4Ks0CgYEA76MNbfpoMP9r6GNwtk/8/fggxHVG+mvS9TMvQQaQdr3c7/dZ8s621p/jqJkPT+cD748ZoT9WMcjFIpP5N/RHLyZMzJxSATyk/Hs9KgOLuBcpJuN8347vY/se04qLoYLBzOU3kVOW74gwrZ5Mm8FSKHXK1q6PyQviKaoBjxVNCXsCgYEA7gx87jQqptjN3vtAtYQSbFD1BZ