Skip to content

Instantly share code, notes, and snippets.

View CJentzsch's full-sized avatar

Christoph Jentzsch CJentzsch

View GitHub Profile
@CJentzsch
CJentzsch / createL.js
Created July 14, 2016 20:40
create a list of all child DAOs and its extraBalance account (plus main DAO and its extraBalance account)
var address = '0xbb9bc244d798123fde783fcc1c72d3bb8c189413';
// define the dao-contract
var abi = [
{name:"getNewDAOAddress", "type":"function","outputs":[
{"type":"address","name":"_newDAO"}],"inputs":[
{"type":"uint256","name":"_proposalID"}],"constant":true},
{name:"numberOfProposals","type":"function","outputs":[
{"type":"uint256","name":"_numberOfProposals"}],"inputs":[],"constant":true},
{name : "extraBalance", "constant" : true, "inputs" : [], "type" : "function",
def f(diff, n):
"""
This function returns the new difficulty.
"""
period_count = (n + 1) // 100000
return max(diff + 2**(period_count - 1), 5000)
diff = 6232935860523 # starting diffculty
blocknumber = 200000 # starting blocknumber
numberOfBlocks2years = 2*365*24*60*60/15
"walletConfirm" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : "0xfffffffff",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"pre" : {
@CJentzsch
CJentzsch / refund.sol
Created July 7, 2016 14:48
Refund contract
/*
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@CJentzsch
CJentzsch / daos.json
Last active September 10, 2017 21:03
All childDAOs and the mainDAO
[
{
"address":"0xd4fe7bc31cedb7bfb8a345f31e668033056b2728",
"extraBalanceAccount":"0xb3fb0e5aba0e20e5c49d252dfd30e102b171a425"
},
{
"address":"0x2c19c7f9ae8b751e37aeb2d93a699722395ae18f",
"extraBalanceAccount":"0xecd135fa4f61a655311e86238c92adcd779555d2"
},
{

Keybase proof

I hereby claim:

  • I am cjentzsch on github.
  • I am cjentzsch (https://keybase.io/cjentzsch) on keybase.
  • I have a public key ASBju2bNM5AAfALJLOPuVTv14pdSJ3bZeC7aLLTaslHdzQo

To claim this, I am signing this object:

000000000000000000000000b2cb826c945d8df01802b5cf3c4105685d4933a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000145354494654554e47204466696e69747920464443000000000000000000000000
000000000000000000000000b2cb826c945d8df01802b5cf3c4105685d4933a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000145354494654554e47204466696e69747920464443000000000000000000000000
/*
The MIT License (MIT)
Copyright (c) 2016 DFINITY Stiftung
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@CJentzsch
CJentzsch / witness
Created December 7, 2016 21:57 — forked from gavofyork/witness
The Witness Algorithm: Privacy Protection in a Fully Transparent System
# The Witness Algorithm: Privacy Protection in a Fully Transparent System
By **Vlad Gluhovsky** and **Gavin Wood**
# Introduction
Being based upon a quasi-Turing-complete (quasi because it's actually bounded) virtual machine, Ethereum is an extremely versatile system. However one of its greatest strengths---universal auditability---seems to lead to a fatal flaw, namely an inescapable lack of privacy. Here we demonstrate an algorithm in order to prove that this is not the case.
The algorithm could be used to make an Ethereum contract which, given two sets of addresses sources, `src`, and destinations, `dest`, will guarantee exactly one of two possible eventualities:
- For each address in `src`, the controller of that address controls a corresponding address in `dest` (though the two cannot be related *a priori*).