Skip to content

Instantly share code, notes, and snippets.

@haferman
haferman / IBVBuffer.c
Last active May 23, 2023 23:56
patched /opt/beegfs/src/client/client_module_7/source/common/net/sock/ibv/IBVBuffer.c for Ubuntu 20.04
#if defined(CONFIG_INFINIBAND) || defined(CONFIG_INFINIBAND_MODULE)
#include "IBVBuffer.h"
#include "IBVSocket.h"
bool IBVBuffer_init(IBVBuffer* buffer, IBVCommContext* ctx, size_t bufLen)
{
unsigned count = (bufLen + IBV_FRAGMENT_SIZE - 1) / IBV_FRAGMENT_SIZE;
unsigned i;
@haferman
haferman / challenge13.txt
Created September 3, 2022 17:42
near challenge 13
cd ~/.near
curl ifconfig.me; echo
ls
grep public node_key.json validator_key.json
sudo grep validators /var/log/syslog | tail -2 | ccze -A
on main: sudo systemctl stop neard
on backup: cp node_key.json.main node_key.json; cp validator_key.json.main validator_key.json
sudo systemctl restart neard
sudo grep validators /var/log/syslog | tail -2 | ccze -A

Running a Validator

This section explains how to get a Validator node running on the network, using the same docker image used for running a full node.

Validators help secure the Celo network by participating in Celo’s Proof of Stake protocol. Validators are organized into Validator Groups, analogous to parties in representative democracies. A Validator Group is essentially an ordered list of Validators.

Just as anyone in a democracy can create their own political party, or seek to get selected to represent a party in an election, any Celo user can create a Validator group and add themselves to it, or set up a potential Validator and work to get an existing Validator group to include them.

While other Validator Groups will exist on the Celo Networks, the fastest way to get up and running with a Validator will be to register a Validator Group, register a Validator, and add that Validator to your Validator Group. The addresses used to register Validator Groups and Validators must be unique, which will req

@haferman
haferman / TLS-enable.txt
Last active December 9, 2021 01:35
steps to enable TLS for attestations
1. create DNS "A" record (link ip address with FQDN)
2. make sure port 443 is open
3. sudo apt install nginx
4. stop attestation-service (so we can get certificate on default port 80)
5. sudo systemctl start nginx
6. sudo systemctl enable nginx
7. https://certbot.eff.org/instructions?ws=nginx&os=ubuntubionic
(sudo snap install --classic certbot; sudo ln -s /snap/bin/certbot /usr/bin/certbot; sudo certbot --nginx)
8. sudo vi /etc/nginx/sites-available/default (doc root change to /dev/null so that http://ipaddress will fail)
9. attestation.config should point to new port (8080)
{"claims":[{"url":"https://baklava-a1.validator.capital","timestamp":1603657079,"type":"ATTESTATION_SERVICE_URL"},{"timestamp":1603657083,"type":"ACCOUNT","address":"0xFCb1C60c4342EDEe92dA6fC113cC505D1CC28fa0"}],"meta":{"address":"0xbf2046aEC39D1333816a449a3208d0734578ac53","signature":"0x7f6f19933924cb198f6ff83d148bcdbc24034de36537c7c42c9a75f22fad2f82487a97b342a5727988cee70d30ab4188ca77a2cabd073f80dece27109b3811d41c"}}
{"claims":[{"timestamp":1603252241,"type":"ACCOUNT","address":"0xbf2046aEC39D1333816a449a3208d0734578ac53"}],"meta":{"address":"0xFCb1C60c4342EDEe92dA6fC113cC505D1CC28fa0","signature":"0xdb3d5933f27bf99289893d97c0b0d187899ae56831cf49c2971c292a2349473e454fc4932ef2d7f1c755360421e3cce7346f2cc011d245fe97f62963cb66142e1b"}}
@haferman
haferman / group2_metadata.json
Created August 6, 2020 02:01
group2 metadata
{"claims":[{"timestamp":1596679029,"type":"ACCOUNT","address":"0x3ABE54fe87f77D18b472e47920934CE63b1F6bfc"}],"meta":{"address":"0x23F4877174fF3849a14a591a928DAcf98375288E","signature":"0x4189955da18a8c574a236b775656afce5250e3edcc7136597b17812606492bfa17fbc358d74c14f321a048750d336ed6c40be367d695e9dfa151d7b1afd2554d1b"}}
@haferman
haferman / validator3_metadata.json
Last active October 25, 2020 19:45
validator3 metadata
{"claims":[{"timestamp":1603655132,"type":"ACCOUNT","address":"0x23F4877174fF3849a14a591a928DAcf98375288E"},{"url":"https://a3.validator.capital","timestamp":1603655136,"type":"ATTESTATION_SERVICE_URL"}],"meta":{"address":"0x3ABE54fe87f77D18b472e47920934CE63b1F6bfc","signature":"0xcef3f5546ecee6ebb7d7cbdfb653088c003cac6c45755a801471f5a86245b8d24001b5ee3e51be8d5d7160cddbfa49c779dff52cb1d684cae36f53c624f6eda51b"}}
@haferman
haferman / keybase.md
Created May 6, 2020 05:04
keybase proof

Keybase proof

I hereby claim:

  • I am haferman on github.
  • I am haferman (https://keybase.io/haferman) on keybase.
  • I have a public key ASAdZ1Au8ZLwrBdUxKTGUrOc4JhXXxUdk2naf8Xk8Y3QKgo

To claim this, I am signing this object:

@haferman
haferman / validator2_metadata.json
Last active October 25, 2020 19:09
validator2 metadata
{"claims":[{"timestamp":1603652846,"type":"ACCOUNT","address":"0xB33e9e01E561a1Da60f7Cb42508500e571afb6Eb"},{"url":"https://a2.validator.capital","timestamp":1603652850,"type":"ATTESTATION_SERVICE_URL"}],"meta":{"address":"0x07adF41F00dD7Ec9C63c445f3faD5cCbdc2a7c85","signature":"0x3ef1027b922aeafbbb57af8dccc0fed1f8525b5f37b6666ce0706e5c0d838a0c6060445e8a8b796c48ee2141cf25a1d0034c7c6be63652a51482675d0be77e301b"}}