Skip to content

Instantly share code, notes, and snippets.

View mratsim's full-sized avatar
:shipit:

Mamy Ratsimbazafy mratsim

:shipit:
  • Paris
View GitHub Profile
@mratsim
mratsim / 2020-07-09 Eth2 Call 44.txt
Created July 23, 2020 14:57
2020-07-09 Eth2 Call 44
Agenda: https://github.com/ethereum/eth2.0-pm/issues/169
Nimbus
Audit:
- Consensys Diligence
- Trail of Bits
- NCC
3 phases, 2 weeks audit, 2 or 3 weeks fixes.
Nimbus:
Validator’s book: https://status-im.github.io/nim-beacon-chain/
Auditor’s book: https://status-im.github.io/nim-beacon-chain/auditors-book/
https://github.com/ethereum/eth2.0-pm/issues/165
Altona bugs:
- networking
@mratsim
mratsim / recoding.nim
Created June 5, 2020 22:16
Packed recoding for endomorphism accelerated ECC Scalar Multiplication
import typetraits, strutils
const
BitSize = 2
Shift = 2 # log2(4) - we can store 4 digit per byte
ByteMask = 3 # we need (mod 4) to access a packed bytearray
DigitMask = 0b11 # Digits take 2-bit
type
Recoded[NumDigits: static int] = distinct array[(NumDigits + 3) div 4 + 1, byte]
F1 = GF(21888242871839275222246405745257275088696311157297823662689037894645226208583)
G1 = EllipticCurve(F1,[0,3])
print(G1)
P1 = G1(1,2)
F2 = GF(21888242871839275222246405745257275088696311157297823662689037894645226208583^2,"i",modulus=x^2 + 1)
TwistB = 3*F2("9+i")^(-1)
G2 = EllipticCurve(F2,[0,TwistB])
@mratsim
mratsim / 2020-05-28-Eth2-impl-call-40.txt
Created May 28, 2020 14:54
2020-05-28-Eth2-impl-call-40
https://github.com/ethereum/eth2.0-pm/issues/154
Nimbus
- Networking
- Investigating interop issues with lighthouse
- Protobuf parsing
- attestations received before blocks causing gossip issues
- Pushed this morning: multinets script that work with a 50/50 lighthouse/nimbus validator split
- Snappy fixes
import
std/atomics, std/macros,
synthesis,
../config,
../primitives/compiler_optimization_hints, # for prefetch
../instrumentation/[contracts, loggers]
# type dereference macro
# ------------------------------------------------
# This macro dereference pointer types
@mratsim
mratsim / 2020-05-14 Eth2 impl call 39.txt
Created May 14, 2020 14:57
2020-05-14 Eth2 impl call 39
https://github.com/ethereum/eth2.0-pm/issues/149
--------------------
Nimbus:
- Multiple Sync fixes
- Snappy (add compute issue with Lighthouse’s)
- can now sync to Schlesi: slowly but steadily
- working on performance
- in particular Windows
Agenda: https://github.com/ethereum/eth2.0-pm/issues/145
Nimbus
- Core
- Switched our testnet1 to mainnet.
- Perf improvement to do, in particular repeated hashTreeRoot
- Stack overflow as the beacon state is huge
- Update/rewind states to apply state transition on blocks coming from the network