Skip to content

Instantly share code, notes, and snippets.

@IdoZilberberg
IdoZilberberg / orbs-load-20190501-4nodes.csv
Last active May 2, 2019 12:46
Load test for Orbs network
tps sent actual tps in closed blocks Process CPU Blocks closed/sec storage written kb/sec comments
10 10 1 5 10 OK
50 50 3 7 25 OK
200 200 15 15 80 OK
300 300 20 20 100 Client process starts receiving errors sending transactions
400 380 25 20 130 Multiple errors
500 380 spikes of 450 25 20 150 Exceeded capacity in this configuration
@IdoZilberberg
IdoZilberberg / leanhelix-pseudocode.go
Created August 16, 2018 14:44
Oded & Ido discussion on interface between LH lib and its user (ConsensusAlgo service)
package leanhelix
// All this code is in Lean Helix lib
// All data structures and interfaces should be defined in Lean Helix - it is a library so doesn't know its users, so cannot receive interfaces them
// TODO Decide where Block is defined - in Lean Helix or outside??
// TODO think about SenderSig struct which contains publicKey and signature - maybe use same in LH, or better - use it in Algo wrapper but not in LH lib
// TODO publicKey can be renamed to ID to be more generic.
// TODO Naming of BlockRef/Header - same thing - decide on name
@IdoZilberberg
IdoZilberberg / bigint-rand.go
Created July 31, 2018 07:49
Dealing with large random numbers
package main
import (
"fmt"
"math/big"
"crypto/rand"
)
func main() {
var prime1, _ = new(big.Int).SetString("21888242871839275222246405745257275088548364400416034343698204186575808495617", 10)
@IdoZilberberg
IdoZilberberg / bigint-mul.go
Created July 31, 2018 06:58
Big Integer operations
package main
import (
"fmt"
"math/big"
)
func main() {
// The following prime values were taken from here: https://eips.ethereum.org/EIPS/eip-197
var prime1, _ = new(big.Int).SetString("21888242871839275222246405745257275088548364400416034343698204186575808495617", 10)
@IdoZilberberg
IdoZilberberg / create-bigint.go
Last active July 31, 2018 05:51
Go - Create big.Int
package main
import (
"math/big"
"fmt"
"encoding/json"
)
type bigPoint struct {
X, Y *big.Int
@IdoZilberberg
IdoZilberberg / first.go
Last active July 20, 2018 06:50
First gist for testing
package main
import "fmt"
func main() {
fmt.Println("Hello first gist!")
}