Skip to content

Instantly share code, notes, and snippets.

View njgheorghita's full-sized avatar

Nick Gheorghita njgheorghita

View GitHub Profile
  • bridge node
  • terminal gui (USE WEB3)
  • testnet metrics
  • peertest framework
  • interop testing
  • portalstorage integration
  • utp / owner
  • neigborhood gossip: poke / offer / accept

trin 2022 quarterly goals - https://notes.ethereum.org/1JN2QfHnTfajPOAJGx2Xug

@njgheorghita
njgheorghita / vim_shortcuts.md
Last active December 4, 2020 13:12
vim shortcuts

custom mapping to toggle showcursorline and showcursorcolumn

  • ctrl + u

show git diff between current file state and saved state

  • :w !diff % -

repeat your last edit

  • .

search for all words under cursor

{
"accounts": {
"0x0000000000000000000000000000000000000000": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000001": {
"balance": "0x1",
"builtin": {
"name": "ecrecover",
"pricing": {

devp2p

Components

  • Distributed Peer Table (DPT) / Node Discovery
  • RLPx Transport Protocol
  • Ethereum Wire Protocol (ETH) / Application Layer

RLPx v4

  • v4 is currently the most widely used - (besides LES which uses v5)
  • v5 adoption is coming soon (check felix lange's devcon video below)
  • This summary based on geth implementation (~ 70% of ethereum nodes)

To record audio from mic in terminal

  • sox -d xxx.wav

Set the cycles per second

  • setcps (140/60/4) (140 BPM w/ 4 beats/cycle)
  • setcps 0.6

Degrade

  • randomly removes events from a pattern, 50% (0.5) of the time
  • d1 $ degrade $ s ...

ethPM CLI v1

  • Distros available on pypi, brew, docker, apt
  • Features
    • Managing / Deploying ethPM registries
    • Scraping registries for IPFS assets
    • Generating manifests
    • Installing / Uninstalling ethPM packages to disk
    • Documentation

Data stored in ethpm_dir/event_data.json

  • Chain ID
  • Last Processed Block Number
  • Event Data (contains emitted logs for all processed blocks)
    • Block Number
      • Registry Address that emitted log(s)
        • Package Name, Version, URI

All scraped IFPS uris from processed blocks are written to ethpm_dir/

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
{
"Owner Name": "Nick Gheorghita",
"Keybase ID": "https://keybase.io/nickghita",
"Owned Address": "0x9182902397B57a8c611D764D4DCD24BA951B4319",
}
-----BEGIN PGP SIGNATURE-----

Keybase proof

I hereby claim:

  • I am njgheorghita on github.
  • I am nickghita (https://keybase.io/nickghita) on keybase.
  • I have a public key ASDhbClEqb1E2aStPRl4I3AhF4DidSIlqOBSBx9a4_QxTAo

To claim this, I am signing this object:

- # Solidity source code
- contract_source_code = '''
- pragma solidity ^0.4.21;
-
- contract Greeter {
-     string public greeting;
-
-     function Greeter() public {
-         greeting = 'Hello';