This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Bytes8 { | |
v0: ubyte; | |
v1: ubyte; | |
v2: ubyte; | |
v3: ubyte; | |
v4: ubyte; | |
v5: ubyte; | |
v6: ubyte; | |
v7: ubyte; | |
v8: ubyte; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import | |
chronos, | |
spec/[datatypes] | |
type | |
ChronosTime* = uint64 | |
## Unix epoch timestamp in millisecond resolution | |
# TODO fetch from chronos and make distinct | |
ChronosClock* = object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(type (;0;) (func (result i32))) | |
(type (;1;) (func (param i32 i32))) | |
(type (;2;) (func (param i32 i32 i32))) | |
(type (;3;) (func (param i32))) | |
(type (;4;) (func)) | |
(type (;5;) (func (param i32 i32) (result i32))) | |
(import "env" "getCallDataSize" (func $getCallDataSize (type 0))) | |
(import "env" "revert" (func $revert (type 1))) | |
(import "env" "callDataCopy" (func $callDataCopy (type 2))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Little-endian base 128 variable length integer utilities, as seen in | |
# https://en.wikipedia.org/wiki/LEB128 | |
# | |
# Used in formats like DWARF, WASM - unsigned variant identical to protobuf/go | |
# varint. Exception/Defect free for WASM use | |
import | |
stew/[bitops2, result] | |
const |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBG 2021-04-27 11:05:07.477+02:00 sending control message topics="libp2p gossipsub" tid=480061 file=gossipsub.nim:273 msg="(ihave: @[], iwant: @[(messageIDs: @[])], graft: @[], prune: @[])" peer=16U*F8XUwG | |
DBG 2021-04-27 11:05:08.344+02:00 sending control message topics="libp2p gossipsub" tid=480061 file=gossipsub.nim:273 msg="(ihave: @[], iwant: @[(messageIDs: @[])], graft: @[], prune: @[])" peer=16U*F8XUwG | |
DBG 2021-04-27 11:05:08.551+02:00 sending control message topics="libp2p gossipsub" tid=480061 file=gossipsub.nim:273 msg="(ihave: @[], iwant: @[(messageIDs: @[])], graft: @[], prune: @[])" peer=16U*F8XUwG | |
DBG 2021-04-27 11:05:08.551+02:00 sending control message topics="libp2p gossipsub" tid=480061 file=gossipsub.nim:273 msg="(ihave: @[], iwant: @[(messageIDs: @[])], graft: @[], prune: @[])" peer=16U*F8XUwG | |
DBG 2021-04-27 11:05:08.552+02:00 sending control message topics="libp2p gossipsub" tid=480061 file=gossi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/logos-co/nomos-research/blob/98e2a20bbda525cad6e38035c806b374ca5352b2/consensus-engine/docs/carnot-spec.md | |
import std/[sets, tables] | |
type | |
View = uint | |
Block = ref object | |
view: View | |
qc: Qc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chronos, chronos/threadsync | |
import stew/ptrops | |
import std/locks | |
import std/typetraits | |
const Numbers = 1000 | |
const Threads = 100 | |
type | |
Node = object |