This has moved to https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md
View BasicERC20.sol
pragma solidity ^0.4.19; | |
contract ERC20Basic { | |
string public constant name = "ERC20Basic"; | |
string public constant symbol = "BSC"; | |
uint8 public constant decimals = 18; | |
event Approval(address indexed tokenOwner, address indexed spender, uint tokens); |
View Voting.sol
pragma solidity ^0.6.4; | |
// We have to specify what version of compiler this code will compile with | |
contract Voting { | |
/* mapping field below is equivalent to an associative array or hash. | |
The key of the mapping is candidate name stored as type bytes32 and value is | |
an unsigned integer to store the vote count | |
*/ | |
mapping (bytes32 => uint256) public votesReceived; |
View hashcash.py
# ---------------------------------------------- | |
# hashcash.py: Hashcash implementation | |
# ---------------------------------------------- | |
""" | |
Hashcash is a "proof of work." | |
Example: | |
>>> import sha | |
>>> sha.new('denmark2890CF').hexdigest() '000000cf89643370c24e413ec0886ab92bd7f6e8' |
View BlockPropagation.md
O(1) Block Propagation
The problem
Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."
View gist:7360908
People
![]() :bowtie: |
:smile: |
:laughing: |
---|---|---|
:blush: |
:smiley: |
:relaxed: |
:smirk: |
:heart_eyes: |
:kissing_heart: |
:kissing_closed_eyes: |
:flushed: |
:relieved: |
:satisfied: |
:grin: |
:wink: |
:stuck_out_tongue_winking_eye: |
:stuck_out_tongue_closed_eyes: |
:grinning: |
:kissing: |
:kissing_smiling_eyes: |
:stuck_out_tongue: |
View gist:1579117
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |