Skip to content

Instantly share code, notes, and snippets.

View dongsam's full-sized avatar
⚛️

dongsam dongsam

⚛️
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am dongsam on github.
  • I am dongsam (https://keybase.io/dongsam) on keybase.
  • I have a public key ASA5knCd0zjHXObi7D_wibVdNiq_anhn8lP5qEs-kd8AKgo

To claim this, I am signing this object:

@dongsam
dongsam / ethash.py
Created November 9, 2017 21:20
ethash
WORD_BYTES = 4 # bytes in word
DATASET_BYTES_INIT = 2**30 # bytes in dataset at genesis
DATASET_BYTES_GROWTH = 2**23 # dataset growth per epoch
CACHE_BYTES_INIT = 2**24 # bytes in cache at genesis
CACHE_BYTES_GROWTH = 2**17 # cache growth per epoch
CACHE_MULTIPLIER=1024 # Size of the DAG relative to the cache
EPOCH_LENGTH = 30000 # blocks per epoch
MIX_BYTES = 128 # width of mix
HASH_BYTES = 64 # hash length in bytes
DATASET_PARENTS = 256 # number of parents of each dataset element
pragma solidity ^0.4.18;
import "./StandardToken.sol"; // ERC20 을 따르는 기본 Token Contract
import "../../ownership/Ownable.sol";
// contract 의 owner 를 지정, 수정할 수 있게하는 역시 zeppelin-solidity 에 포함된 contract
contract MintableToken is StandardToken, Ownable {
/* 위에서 import 한 .sol 들에 포함된 StandardToken, Ownable Contract 를 다중상속하여
그 특징들을 그대로 해당 MintableToken Contract 에서 사용,