Skip to content

Instantly share code, notes, and snippets.

View antsankov's full-sized avatar

Alex Tsankov antsankov

View GitHub Profile
@antsankov
antsankov / multigeth.sh
Created April 22, 2020 16:35
How to run a Multigeth Phoenix Node with Sane Flags
./nodes/multi-geth-phoenix --classic --cache 4096 --datadir "/mnt/volume_ams3_04/.multigeth-classic/" --rpc --rpcaddr "127.0.0.1" --rpccorsdomain "*" --rpcport "8545" --rpcapi "db, eth, net, web3, personal" --ws --wsport 8546 --wsaddr "127.0.0.1" --wsorigins "*" --wsapi "web3, eth" --maxpeers=100
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.7.0;
/***
*
* Structue of Treasury
* - Every block 20% of all block reward goes to this contract with deposit(false), if miner has no faith in the system they can call deposit(true) and funds are sent to burn address.
* - There are 3 triads addresses (ETCLabs, ETCCoop, IOHK) - any policy requires consensus of 2 of 3.
* - A proposal is made with a claiment address, amount of ether to be claimed, blockNumber that activates the claim.
* - If a poroposal gets support of 2 of 3 triads, proposal funds can be collected after the blockNumber, with redeem() which pays out to the claiment.
@antsankov
antsankov / etc_kecck256_test.txt
Created February 24, 2021 03:12
ECIP-1049-Keccak256-Mining-Test-Vectors
Nonce: 0x0000000000000038
Mining Hash Hex: 0xec1e0af050c8c5b9e2b59c65da7d9dd62eaf5a17f9ff6a91da60858a0233e444
Keccak Header Input: 0xec1e0af050c8c5b9e2b59c65da7d9dd62eaf5a17f9ff6a91da60858a0233e4440000000000000038
Keccak Result: 0x0116ad248e0dc3f7f843f73a62803c5f6b7c0427700b70c8b1aab39db404089f
Hash (int):492378471644473844779041230572681759021515627522456897855697138922293561503
Difficulty (int):1157920892373161954235709850086879078532699846656405640394575840079131296399
Difference (hash - diff): -665542420728688109456668619514197319511184219133948742538878701156837734896