Skip to content

Instantly share code, notes, and snippets.

Prysm x Geth EIP4844 Interop

Prysm setup

Clone the capella branch in the Prysm repo and build the binaries

$ git clone https://github.com/prysmaticlabs/prysm.git
$ cd prysm
$ git checkout capella
$ bazel build //cmd/prysmctl
// Problem: COMPUTE THE LONGEST CONTIGUOUS INCREASING SUBARRAY
//
// An array is increasing if each element is less than its succeeding element except for the last element.
// Implement an algorithm that takes as input an array A of n elements,
// and returns the beginning and ending indices of a longest increasing subarray of A.
//
// For example, if A =(2,11,3,5,13,7,19,17,23),
// the longest increasing subarray is (3,5,13), and you should return (2,4)
// Problem: Sum Swap
//
// Given two array of integers, find a pair of values (one value from each array) that you can swap
// to give the two arrays the same sum.
//
// Input:{4,1,2,1,1,2} and {3, 6, 3, 3}
// Output: {1, 3}
@terencechain
terencechain / box.md
Last active November 8, 2020 22:57
Terence's staking box

Background:

I want to take advantage of up-coming black friday sales and build a staking box for eth2

Goal:

Less than $800 USD. 8 cores, 32GB, 1TB SSD

CPU:

Intel® Core™ i7-9700K
Price: $299.98 on Amazon.
Rationale: I want at least 8 cores.

func BenchmarkValidateAggregateAndProof(b *testing.B) {
db, _ := dbtest.SetupDB(b)
var testing *testing.T
p := p2ptest.NewTestP2P(testing)
validators := uint64(256)
beaconState, privKeys := testutil.DeterministicGenesisState(b, validators)
blk := testutil.NewBeaconBlock()
require.NoError(b, db.SaveBlock(context.Background(), blk))