Skip to content

Instantly share code, notes, and snippets.

View wakiyamap's full-sized avatar
🏠
Working from home

WakiyamaP wakiyamap

🏠
Working from home
View GitHub Profile
@wakiyamap
wakiyamap / monacoin.txt
Last active October 2, 2020 21:23 — forked from lae/monacoin.txt
[ANN][MONA] Monacoin LAUNCHING 2014/01/01 0:00 GMT
[center][img]https://monacoin.org/img/monacoin.png[/img]
[size=15pt]http://monacoin.org/en/[/size]
[b][color=blue][size=15pt]Specifications[/size][/color][/b]
Algorithm: Lyra2REv2 (originally Scrypt until block 450000)
Premine: none
Block reward: 50 MONA
Block time: 1.5 minutes
Retarget: 1 block (Dark Gravity Wave algorithm, hard fork at block 450000)
## monacoin.confの内容
rpcuser=wakiyamatamamichankawaii
rpcpassword=[適当にパスワードどうぞ]
daemon=1
txindex=1
addressindex=1
spentindex=1
server=1
msgid ""
msgstr ""
"Project-Id-Version: electrum\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-08 07:47+0000\n"
"PO-Revision-Date: 2017-08-08 03:48-0400\n"
"Last-Translator: rdymac <rdy@aol.es>\n"
"Language-Team: Japanese\n"
"Language: ja_JP\n"
"MIME-Version: 1.0\n"
@wakiyamap
wakiyamap / from base doge
Last active October 6, 2017 07:42
digishield_pattern1
def bits_to_target(self, bits):
MM = 256*256*256
a = bits%MM
if a < 0x8000:
a *= 256
target = (a) * pow(2, 8 * (bits//MM - 3))
return target
def target_to_bits(self, target):
MM = 256*256*256
@wakiyamap
wakiyamap / from base ltc
Last active October 5, 2017 13:16
digishield_pattern2
def get_target_dgsld(self, height, chain=None):
# Litecoin: go back the full period unless it's the first retarget
if chain is None:
chain = {}
nTargetTimespan = 95040 #1.1 days 1.1*24*60*60
nTargetSpacing = 1.5 * 60 #1.5 minute
nTargetSpacingDigisheld = 1.5 * 60 #1.5 minute
01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
a64bac07fe31877f31d03252953b3c32398933af7a724119bc4d6fa4a805e435 - merkle root
f083c252 - timestamp
f0ff0f1e - bits
66d61200 - nonce
01 - number of transactions
01000000 - version
01 - input
0000000000000000000000000000000000000000000000000000000000000000ffffffff - prev output
DB_DIRECTORY = /var/electrumx
USERNAME = electrumx
ELECTRUMX = /usr/local/bin/electrumx_server.py
#Bitcoin Node RPC Credentials
DAEMON_URL = http://user:pass@IPaddress:port/
#port is optional, defaults to COIN RPC default
#
#REQUIRED FOR PUBLIC VISIBILITY
@wakiyamap
wakiyamap / LTC,KGW,DigiShield_target_algo
Last active December 26, 2017 04:04
LTC,KGW,DigiShield_target_algo
def convbits(self,new_target):
c = ("%064x" % int(new_target))[2:]
while c[:2] == '00' and len(c) > 6:
c = c[2:]
bitsN, bitsBase = len(c) // 2, int('0x' + c[:6], 16)
if bitsBase >= 0x800000:
bitsN += 1
bitsBase >>= 8
new_bits = bitsN << 24 | bitsBase
return new_bits
01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
a64bac07fe31877f31d03252953b3c32398933af7a724119bc4d6fa4a805e435 - merkle root
ec2dbf58 - timestamp
f0ff0f1e - bits
6c642000 - nonce
01 - number of transactions
01000000 - version
01 - input
0000000000000000000000000000000000000000000000000000000000000000ffffffff - prev output
A
$ dcrctl --testnet --rpcuser=0920 --rpcpass=password --wallet getnewaddress
TsfxqUymvKKP9eGPkwewk4puJEf5hGt4cfB
B
$ monacoin-cli getnewaddress
n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE
A
$ monaatomicswap --testnet --rpcuser=0920 --rpcpass=password initiate n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE 1.0