Skip to content

Instantly share code, notes, and snippets.

@ZenGround0
ZenGround0 / upgrade-validation-with-ent.md
Last active November 25, 2020 01:09
Use ent for post-upgrade validation

Run a lotus node and sync the filecoin blockchain up to the height you want to validate

One way to see how far you've synced is to inspect the output of ./lotus sync wait

Get the inspection-cid

"inspection-cid" is the cid of the block header at inspection-epoch, the epoch whose parent state you want to validate.

By Using the lotus daemon

  1. ./lotus chain head to get your node's current head if inspection-epoch is head height. A list of cids is output, copy one of them.
  2. ./lotus chain list --height=<inspection-epoch> --count=1 if head is above inspection epoch. A list of cid to miner mappings is output, copy one of them.

By Using filfox

Navigate to https://filfox.info/en/tipset/<inspection-height>

Intro

@sternhenri and @jzimmerman have proposed a strict timestamp validation rule for the filecoin network. The rule (1) is that all epochs uniquely determine a period in time fixed by the genesis timestamp. Blocks with timestamps that don't fall within the window specified by their height are marked as invalid by the protocol. This relies on a clock synchrony assumption.

Talking with @Kubuxu I learned that the lotus team is hesitant to adopt these strict timestamp rules for at least one major reason: recovery after chain halting. This document dives into the proposed timing validation rule and its impact on recovery from chain halting. It makes an argument for keeping these strict validation rules and explores some chain halting recovery options.

Timing model

During steady state operation (i.e. CHAIN_FOLLOW mode) a filecoin node mines off of the heaviest tipset it finds. Nodes mine with the appropriate number of null blocks to put their candidate block in the current epoch. If a node wins an

@JacobJohansen
JacobJohansen / AuthyToOtherAuthenticator.md
Created October 20, 2017 15:12 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@warnergodfrey
warnergodfrey / gist:4728855
Last active December 12, 2015 06:28
Get ATO AusKey to work on Mac OS X without f**king up your Java development environment
  • Install AusKey software
  • Show file contents of /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  • Move .JAR files from /Library/Java/Extensions to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/ext

UPDATE 16/11/2013: AusKey no longer requires software to be installed on Mac OS X so these steps are no longer necessary