I hereby claim:
- I am dapplion on github.
- I am dapplion (https://keybase.io/dapplion) on keybase.
- I have a public key ASDW5WWJDYWzTPeMQwHNbYRtlMcOtAkiFHU7Nw7ehNQfkwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Original code from https://github.com/aragon/apm.js/blob/3d818929ce19410ea6a29e12964b19c08312b7a7/src/utils/timeout-promise.js | |
*/ | |
function original(promise, ms) { | |
// Create a promise that rejects in <ms> milliseconds | |
const timeout = new Promise((resolve, reject) => { | |
const id = setTimeout(() => { | |
reject('Timed out in ' + ms + 'ms.') | |
}, ms) | |
}) |
// import in3-Module | |
const In3Client = require("in3").default; | |
const Web3 = require("web3"); | |
// use the In3Client as Http-Provider | |
const web3 = new Web3( | |
new In3Client({ | |
proof: "standard", | |
signatureCount: 1, | |
requestCount: 2, |
const In3Client = require("in3").default; | |
// use the In3Client | |
const in3 = new In3Client({ | |
proof: "standard", | |
signatureCount: 1, | |
chainId: "mainnet", | |
replaceLatestBlock: 50 | |
}); |
Warning: This a work in progress document with many broken links, some unfinished sections, and commands for including code segments. The entirety of the document is subject to change without warning.
This document is an aid to the specification of the state transition function and accompanying data structures for Phase 0 - The Beacon Chain -- the core system level chain at the heart of Ethereum 2.0.
The primary Phase 0 specification is particularly terse, only defining much of the functionality via python code and comments. This document aims to provide a more verbose version of the specification, primarily aimed at helping onboard new contributors to E
This reference describes the syntax of the Lodestar CLI commands and their options.
Option | Type | Description | Default |
---|---|---|---|
--rootDir |
string | Lodestar root directory | |
--testnet |
string | Use a testnet configuration | |
--preset |
string | Specifies the default eth2 spec type | mainnet |
import {createIBeaconConfig, IBeaconConfig} from "@chainsafe/lodestar-config"; | |
import {params} from "@chainsafe/lodestar-params/lib/presets/mainnet"; | |
import {TreeBacked, List, toHexString} from "@chainsafe/ssz"; | |
import {Root, ValidatorIndex, DepositData} from "@chainsafe/lodestar-types"; | |
import {IDepositEvent} from "./eth1"; | |
import {computeDomain, DomainType, computeSigningRoot} from "@chainsafe/lodestar-beacon-state-transition"; | |
import {interopKeypair} from "@chainsafe/lodestar-validator"; | |
import {initBLS, Keypair, PrivateKey} from "@chainsafe/bls"; | |
async function learnProofs(): Promise<void> { |
// Generate random data | |
const num = 1000000; | |
const dataArr: {a: Uint8Array; b: Uint8Array}[] = []; | |
const len = 32; | |
for (let i = 0; i < num; i++) { | |
const nums: number[] = []; | |
for (let j = 0; j < len; j++) { | |
nums[j] = j; | |
} | |
const a = new Uint8Array(nums); |
address,firstDonationTimestamp,totalDonationCount,maxDonationValueUSD,totalDonationValueUSD | |
0xa1e8153d5eb68e5b7cd5262be22fc6f13a3f1a8e,1523867187,4,28904.00944969315,32548.650612839876 | |
0xe8c904dc650e6fcb3fe39cc82b40bd897c83d8fa,1587738531,4,22089.433833908097,30450.04342692288 | |
0x839395e20bbb182fa440d08f850e6c7a8f6f0780,1523523132,10,21369.247300392406,28563.818893363685 | |
0x2586e4b30c581ee20af694495dbcf98daecde75e,1574452127,3,12500,25000 | |
0xd152f549545093347a162dce210e7293f1452150,1611950239,4,12808.593738103727,15802.282990294374 | |
0xf2354570be2fb420832fb7ff6ff0ae0df80cf2c6,1608731262,1,11111.393325278,11111.393325278 | |
0x3342e3737732d879743f2682a3953a730ae4f47c,1617646594,1,8784.74944742474,8784.74944742474 | |
0x087b33c9a4bdb2fa55a742c51ab44ec66f35bc95,1580640579,1,8583,8583 | |
0x9e86dab80c154c2b4f39ac6600baa341e3517825,1604122887,1,4094.270932530857,4094.270932530857 |