Skip to content

Instantly share code, notes, and snippets.

Avatar

vyzo vyzo

  • Internet
  • Planet Earth
View GitHub Profile
@vyzo
vyzo / episub-1000.txt
Created Aug 7, 2022
Preliminary EPISUB results with 1000 nodes
View episub-1000.txt
>>> Running simulations with nodes: 1000, sources: 5, messages: 60, rng-state: #(3906201752 593635287 270152346 3570226858 1968263816 2261421116)
+++ gossipsub/v1.0
=== simulation summary ===
nodes: 1000
messages: 60
sources: 5
publish: 60
deliver: 60000
!!pubsub.message: 377370
!!pubsub.connect: 20000
@vyzo
vyzo / episub-500.txt
Created Aug 5, 2022
Preliminary EPISUB results with 500 nodes
View episub-500.txt
>>> Running simulations with nodes: 500, sources: 5, messages: 60, rng-state: #(450148173 3493484164 3958739570 345133728 1597196054 3722366174)
+++ gossipsub/v1.0
=== simulation summary ===
nodes: 500
messages: 60
sources: 5
publish: 60
deliver: 30000
!!pubsub.message: 189451
!!pubsub.connect: 10000
@vyzo
vyzo / episub-250.txt
Created Aug 4, 2022
Preliminary EPISUB results with 250 nodes
View episub-250.txt
>>> Running simulations with nodes: 250, sources: 5, messages: 60, rng-state: #(1288990669 1488285165 2465753151 3626470647 1609608140 743526869)
+++ gossipsub/v1.0
=== simulation summary ===
nodes: 250
messages: 60
sources: 5
publish: 60
deliver: 15000
!!pubsub.message: 96320
!!pubsub.connect: 5000
@vyzo
vyzo / episub-experiments.md
Created Aug 2, 2022
Some Preliminary EPISUB results
View episub-experiments.md

Some Expirements with Episub

The gossipsub simulator now has experimental support for episub -- see also the discussion in the specs repo.

The episub extension comes with two new control messages, CHOKE and UNCHOKE. Choking a peer means instructing it to not directly forward messages, except self-published through flood publish, even though it remains in the mesh; instead the peer sends gossip. Unchoking a peer means instructing it to resume forwarding messages.

@vyzo
vyzo / txnlock.c
Created Jul 8, 2021
Transaction Locks that allow recursive RLocking
View txnlock.c
#include <pthread.h>
#include <sys/types.h>
u_int64_t goid(void) {
return (u_int64_t)pthread_self();
}
@vyzo
vyzo / accum.ss
Created Jun 5, 2020
A simple program to measure list accumulation performance
View accum.ss
(import :std/srfi/1
:std/misc/list
:gerbil/gambit/os)
(export main)
(def (accum1 lst)
(let lp ((rest lst) (r []))
(match rest
([e . rest]
(lp rest (cons e r)))
@vyzo
vyzo / scoresim.ss
Last active May 12, 2020
A program to simulate mesh propagation and score accumulation in gossipsub
View scoresim.ss
;; -*- Gerbil -*-
(import :std/sugar
:std/getopt
:std/iter
:std/srfi/1
:std/misc/pqueue
:std/misc/shuffle
:gerbil/gambit)
(export main)
@vyzo
vyzo / build-log.txt
Created Apr 20, 2020
dockercloud failure
View build-log.txt
Cloning into '.'...
Switched to a new branch 'make'
Pulling cache layers for index.docker.io/gerbil/scheme:latest...
Done!
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'18.03.1-ee-3', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2018-08-30T18:42:30.000000000+00:00', u'ApiVersion': u'1.37', u'MinAPIVersion': u'1.12', u'GitCommit': u'b9a5c95', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.10.2'}}]
Arch: amd64
BuildTime: 2018-08-30T18:42:30.000000000+00:00
ApiVersion: 1.37
Platform: {u'Name': u''}
@vyzo
vyzo / params.md
Created Mar 18, 2020
Calculating Peer Score Configuration Parameters
View params.md

Calculating Peer Score Configuration Parameters

Configuration Parameters and Counters

Configuration parameters for a topic:

// P1
TimeInMeshWeight  float64
TimeInMeshQuantum time.Duration
TimeInMeshCap float64
@vyzo
vyzo / params.txt
Created Mar 17, 2020
peer score parameters back of the envelope
View params.txt
aggregate message rate 120/s
message/mesh peer with 6 mesh peers -> 20/s; with 12 -> 10/s
30 -> sum(n = 0...30, 10 * expt(.97, n)) -> 19.966431048561404
maximum in 2min, +1; in 30s +.25
TimeInMeshWeight 1/120
TimeInMeshQuantum -> 1s
TimeInMeshCap -> 120