- Anonymous Retrospective Broadcasts
- If we don't assume a centralized party that can be trusted to verify information, what we're left with is not really a contact tracing application but a particular kind of messaging application, where users create tracks through space and time, and can retrospectively broadcast anonymous messages to users whose tracks were spatially nearby to theirs in a particular time range.
- This messaging system should be privacy-preserving, in the sense that:
- Server Privacy: An honest-but-curious server should not learn information about any user's space-time tracks;
- Locality Integrity: A user should not be able to broadcast messages to users who were not nearby to them;
- User Privacy:
- A passive adversary cannot not learn any information about a user's space-time track outside of the segments they have broadcast messages to. This means that users who do not broadcast reveal no information about their movements.
| # Quick hack to read latest JHU data and plot confirmed cases and deaths | |
| # Dashboard: https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6 | |
| # Data: https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data/csse_covid_19_time_series | |
| caseplot <- function(filename, color) { | |
| uu = read.csv(filename, header=TRUE, stringsAsFactors=FALSE) | |
| vv = uu[which(uu[,2] == "US"),] | |
| cumulative.confirmed = apply(vv[,5:60], 2, sum) | |
| new.confirmed = diff(cumulative.confirmed) | |
| plot(new.confirmed, col=color, type='o', xlab="", ylab="", main="", lty="dashed", pch=20) |
The following is an informal compendium of ways you can screw up when mixing and matching smart contracts:
- Be aware of front running on changes to the
allowedvalue. - Be aware that some tokens don't return a boolean on success or failure.
- Some token balances change overtime, even without a transfer.
- Use
balanceOf(addr)over internal accounting. (https://medium.com/trustless-fund/atoken-withdrawal-vulnerability-disclosure-5d8eadc64539)
| ####### Shortcut Hotkeys ############# | |
| # open terminal | |
| lalt - return : $HOME/.config/skhd/open_terminal.sh --single-instance | |
| lalt + shift - return : $HOME/.config/skhd/open_terminal.sh | |
| #alt - t : osascript -e 'tell application "iTerm2" to create window with default profile' | |
| # restart Yabi, SpaceBar, and SKHD | |
| #lalt + lcmd - r : \ | |
| # launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"; \ | |
| # skhd --reload |
| // SPDX-License-Identifier: AGPL-3.0-or-later | |
| // The ABI encoder is necessary, but older Solidity versions should work | |
| pragma solidity ^0.7.0; | |
| pragma experimental ABIEncoderV2; | |
| // These definitions are taken from across multiple dydx contracts, and are | |
| // limited to just the bare minimum necessary to make flash loans work. | |
| library Types { | |
| enum AssetDenomination { Wei, Par } |
| pragma solidity ^0.7.0; | |
| // Each mining pool that intends to provide flash loans deploys a Loaner contract and transfers ETH to it | |
| // When testing each bundle, the diff in balance in this contract is taking into account for calculating effective gas price | |
| // The contract loans funds only on blocks mined by the miner and on zero-gasprice txs | |
| contract Loaner { | |
| address immutable owner; | |
| constructor(address _owner) { | |
| owner = _owner; |
| package main | |
| import ( | |
| "fmt" | |
| "math/big" | |
| "github.com/ethereum/go-ethereum/accounts/abi" | |
| "github.com/ethereum/go-ethereum/common" | |
| "github.com/ethereum/go-ethereum/common/hexutil" | |
| ) |
| # add this to your hardhat config | |
| # compilers: [ | |
| # { | |
| # version: "0.8.13", | |
| # settings: { | |
| # viaIR: true, | |
| # outputSelection: { | |
| # "*": { | |
| # "*": ["irOptimized"], | |
| # }, |
Syncing an Ethereum node is largely reliant on latency and IOPS, I/O Per Second, of the storage. Budget SSDs will struggle to an extent, and some won't be able to sync at all. IOPS can roughly be used as proxy of / predictor for latency. Measuring latency directly is arguably better.
This document aims to snapshot some known good and known bad models.
The drive lists are ordered by interface and then by capacity and alphabetically by vendor name, not by preference. The lists are not exhaustive at all. @mwpastore linked a filterable spreadsheet in comments that has a far greater variety of drives and their characteristics. Filter it by DRAM yes, NAND Type TLC, Form Factor M.2, and desired capacity.
For size, 4TB is a conservative choice which also supports a Fusaka "supernode". The smaller 2TB drive should last an Ethereum full node until at least sometime 2026, with [pre-merge history expiry](http
| # quine.etk | |
| # ⬜ => ⬜ | |
| # A quine is a computer program which takes no input and produces a copy of its own source code as its only output. | |
| # 0x80...f3 is the compiled code excluding the push16 instruction (from dup1 to return) | |
| push16 0x8060801b17606f5953600152602136f3 | |
| # --- stack --- | |
| dup1 # code code | |
| push1 128 # 128 code code |