Skip to content

Instantly share code, notes, and snippets.

View frozeman's full-sized avatar

Fabian Vogelsteller frozeman

View GitHub Profile
DB = {};
DB.movies = new Meteor.Collection('movies');
DB.ratings = new Meteor.Collection('ratings');
/*
* OfflineCollections, works as wrapper to easily clean your local collections
*/
OfflineCollections = (function(){
// PRIVATE
# METEOR CORE:
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
@frozeman
frozeman / ercevocer.js
Created April 28, 2017 12:48
Use solidity ecrecover with signature calculated with eth_sign
// Change accountToSignWith to the address of your account.
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var accountToSignWith = '0xbedcf417ff2752d996d2ade98b97a6f0bef4beb9';
var message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.'
@frozeman
frozeman / chat.js
Created June 19, 2017 12:52 — forked from bas-vk/chat.js
whisper chat demo
var chat = {
username: "<not set>",
topic: "0xfeedbabe",
key: "",
identity: "",
pollInterval: null,
filter: null,
setUsername: function(name) {
this.username = name;
@frozeman
frozeman / SymbioticBlockCreation.md
Last active April 25, 2022 22:44 — forked from blazejkrzak/SymbioticBlockCreation.md
Symbiotic block creation with Pandora and Vanguard orchestrated

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.

/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.