Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabian Vogelsteller frozeman

View GitHub Profile
@frozeman
frozeman / SymbioticBlockCreation.md
Last active May 4, 2021 — forked from blazejkrzak/SymbioticBlockCreation.md
Symbiotic block creation with Pandora and Vanguard orchestrated
View SymbioticBlockCreation.md

Block creation

Pandora and Vanguard orchestration when producing a new block.

Terminology

Orchestrator - client written in go. Its responsibility is to orchestrate the Pandora and Vanguard to verify blocks.

Pandora - modified fork of go-ethereum (geth). Responsible to create valid execution blocks. P2P is enabled to share txpool and propagate blocks. It requires symbiotic connection with the orchestrator/validator client.

Vanguard - modified fork of prysm client. Responsible to run consensus algorithm (CASPER) with add execution layer data for shard0.

@frozeman
frozeman / isValidSignature.sol
Created Jun 25, 2020
Signature verification in solidity, taken from 0x
View isValidSignature.sol
/// @dev Verifies that a hash has been signed by the given signer.
/// @param hash Any 32 byte hash.
/// @param signerAddress Address that should have signed the given hash.
/// @param signature Proof that the hash has been signed by signer.
/// @return True if the address recovered from the provided signature matches the input signer address.
function isValidSignature(
bytes32 hash,
address signerAddress,
bytes memory signature
)
@frozeman
frozeman / ricoABI.json
Created Apr 29, 2020
rICO ABI - april 2020
View ricoABI.json
[
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
View test.js
Refundable ICO
Test 1
allocation phase
--------
blockNumber: 0
Current Flow: 0.1
investorETH: 100
projectETH: 0
available for project: 0
ETH in RICO: 100
@frozeman
frozeman / rico.md
Last active Jan 3, 2019
Reversible ICO - RICO
View rico.md

Reversible ICO

To increase fairness and responsibility in the ICO space, we propose a new model for an ICO, which we call a ”Reversible ICO” (RICO). This type of ICO improves the power balance between coin buyer and project by flowing funds slowly to the project and allowing coin buyers to withdraw their funds at any point in time.

The ERC 20 Token Standard [Fab] spurred a new era of projects that run ICOs on th Ethereum Blockchain. This is mainly due to the flexibility of a smart contract interface standard, meaning it only defines how to interact with it, but not how it should internally work. This flexibility allows ERC 20 tokens to be used in all kind of smart contract based protocol, and be issued by other smart contracts, like an ICO smart contract.

Current ICOs deploy a smart contract that receives ETH and return tokens (cryptocurrencies, assets, utility tokens, protocol tokens, access tokens, etc.) based on a set ratio. This ratio is sometimes changing over time while the ICO is running, and ma

@frozeman
frozeman / whisper-api-test.js
Created Jun 27, 2017
Whisper web3.js 1.0 api test
View whisper-api-test.js
var net = require('net');
var Web3 = require('./src/index.js'); var web3 = new Web3(new Web3.providers.IpcProvider('/Users/frozeman/Library/Ethereum/geth.ipc', net));
var shh = web3.shh;
var identities = [];
var subscription = null;
Promise.all([
shh.newSymKey().then((id) => {identities.push(id);}),
shh.newKeyPair().then((id) => {identities.push(id);})
@frozeman
frozeman / chat.js
Created Jun 19, 2017 — forked from bas-vk/chat.js
whisper chat demo
View chat.js
var chat = {
username: "<not set>",
topic: "0xfeedbabe",
key: "",
identity: "",
pollInterval: null,
filter: null,
setUsername: function(name) {
this.username = name;
@frozeman
frozeman / rpc-test.js
Last active Jan 18, 2018
Test RPC in node.js
View rpc-test.js
/*
- $ geth --shh
- install node.js and npm
- $ mkdir testFolder
- $ npm install oboe
- $ node
- copy the code below
- exceute: send('eth_blockNumber', []);
*/
@frozeman
frozeman / whisper-api-v5.md
Last active May 17, 2017
Whisper API spec
View whisper-api-v5.md

Whisper API 5.0

This is the proposed API for whisper v5.

Specs

shh_version

Returns the current semver version number.

@frozeman
frozeman / mistfeatures.md
Created May 8, 2017
Mist Low Level Features
View mistfeatures.md
  • swarm integration
  • secure webviews
  • Mist UI
  • starting of nodes, switching networks etc
  • IPC proxy to the node
  • accounts/dapp permissions
  • preloader logic to inject stuff
  • node updatelogic
  • mist update logic
  • onboarding screen