Skip to content

Instantly share code, notes, and snippets.

View blockpane's full-sized avatar
🚀

Todd G blockpane

🚀
View GitHub Profile

BP Setup Notes: Manual registration

Once your node is connected, how do you register to be a FIO testnet producer?

If there isn't a local node available, use the testnet RPC-API node, setup an "alias" pointing at a live server:

$ alias clio="clio -u https://testnet.fioprotocol.io"
@blockpane
blockpane / get_linked.go
Created June 1, 2020 23:56
search history for linked auth
package main
import (
"flag"
"fmt"
"github.com/fioprotocol/fio-go" // note: need 'go get github.com/fioprotocol/fio-go@develop' at time of writing.
"github.com/fioprotocol/fio-go/imports/eos-go"
"os"
)
@blockpane
blockpane / chaos-voter.go
Last active June 3, 2020 03:51
chaos-voter ... votes for random FIO block producers, un-votes for those who are missing blocks.
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"github.com/fioprotocol/fio-go"
"github.com/fioprotocol/fio-go/imports/eos-go"
"io/ioutil"
@blockpane
blockpane / Dockerfile
Last active August 27, 2020 03:00
FIO dockerfile
FROM ubuntu:18.04
RUN apt-get update; apt-get -y dist-upgrade; apt-get -y install wget jq
RUN wget "https://bin.fioprotocol.io/mainnet/fioprotocol-2.0.x-latest-ubuntu-18.04-amd64.deb" && \
apt-get install -y ./fioprotocol-2.0.x-latest-ubuntu-18.04-amd64.deb && rm -f ./fioprotocol-2.0.x-latest-ubuntu-18.04-amd64.deb
# testnet:
#WORKDIR /etc/fio/nodeos
#RUN rm -f config.ini genesis.json && ln -s genesis-testnet.json genesis.json && ln -s testnet-config.ini config.ini
### Keybase proof
I hereby claim:
* I am blockpane on github.
* I am frameloss (https://keybase.io/frameloss) on keybase.
* I have a public key ASCWEEcnHoD7hz7Bs1-NAA-VzpDUl4nZh-Q4e6yv345jtQo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am blockpane on github.
* I am blockpane (https://keybase.io/blockpane) on keybase.
* I have a public key ASDQzusGbwFegxVQI-cPfq6zTfumSCSxuttTZki-LKGHqgo
To claim this, I am signing this object:
@blockpane
blockpane / devnet.md
Last active December 14, 2020 05:21
FIO Devnet

FIO devnet

  1. I recommend creating a seperate user account for this, only used for running a dev net.
  2. Must be on Ubuntu 18.04
  3. User will require sudo access for part of the install.

Get code

In the user's home directory clone the following four repositories, suggest using the Develop branch for each:

@blockpane
blockpane / linkauth.md
Last active February 2, 2021 22:52
linkauth

Linkauth cheatsheet

given two keys:

account granting permissions:

Account Name:   produceracct
@blockpane
blockpane / address.go
Last active February 25, 2021 06:27
Get Ethereum address from transaction
package main
import (
"context"
"fmt"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
)
@blockpane
blockpane / query.md
Last active February 26, 2021 16:24
How to query fio.address tables using a hash

Getting FIO addresses or names from the address tables using an i128 hash

Overview

The hash is a truncated sha1 hash, in big-endian order, as a hex-string.

  1. calculate the sha1 sum of the address
  2. take the first 16 bytes
  3. reverse the byte order
  4. convert to a hexadecimal string, and prepend "0x"