Skip to content

Instantly share code, notes, and snippets.

@pmitchev
pmitchev / daemon_commands.md
Created December 8, 2015 04:10
Bytecoin daemon commands
@pmitchev
pmitchev / walletd_examples.md
Created December 8, 2015 04:05
walletd examples

walletd rpc

  • create_address
curl -X POST -i -H "Accept: application/json" -d '{"params": {},"jsonrpc": "2.0", "id": "test","method":"create_address"}' http://localhost:10050/json_rpc
  • get_address_count
curl -X POST -i -H "Accept: application/json" -d '{"params": {},"jsonrpc": "2.0", "id": "test","method":"get_address_count"}' http://localhost:10050/json_rpc
var http = require("http");
var https = require("https");
var redis = require('redis');
require('./lib/configReader.js');
global.redisClient = redis.createClient(config.redis.port, config.redis.host);
global.symbol_lc = config.symbol.toLowerCase();
global.address_fc = config.poolServer.poolAddress.charAt(0);
@pmitchev
pmitchev / oneevilcoin.conf
Last active August 29, 2015 14:25
oneevilcoin.conf
GENESIS_COINBASE_TX_HEX=011e01ff0001b5e49ea5da72029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd0880712101b548243c160c3d1a1fdfbd3d9fc19f5ebdab08f4125d906c1aa40bd03464f74b
seed-node=91.121.221.92:7666
seed-node=162.243.247.45:7666
EMISSION_SPEED_FACTOR=21
DIFFICULTY_TARGET=60
CRYPTONOTE_DISPLAY_DECIMAL_POINT=12
MONEY_SUPPLY=8265395001600000000
MINIMUM_FEE=5000000000
CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW=30
CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE=20000
@pmitchev
pmitchev / gist:d83c010d64aa3ee52b53
Created June 16, 2015 20:05
Bytecoin fork creation process
1. I make those changes in the original code:
https://github.com/pmitchev/testcoin/commit/bde47c6b7c575ab04aee43cc372ff1ebd3306d7a
2. I buy blank Ubuntu 14.04 VPS (2 GB RAM)
3. I install dependencies:
```
wget https://raw.githubusercontent.com/forknote/cryptonote-generator/master/configure.sh
```
./configure
4. Clone and compile:
```
@pmitchev
pmitchev / notes.txt
Created January 20, 2015 10:12
Cryptonote RPC queryblocks.bin Python example
MAP: https://github.com/amjuarez/bytecoin/blob/master/contrib/epee/include/storages/portable_storage_base.h
2015-Jan-12 19:46:44.568400 [RPC0]HTTP [127.0.0.1] GET /queryblocks.bin
2015-Jan-12 19:46:44.568449 [RPC0]8 <- ??? ( uint8 maybe )
2015-Jan-12 19:46:44.568470 [RPC0]9 <- 9 chars string
2015-Jan-12 19:46:44.568487 [RPC0]62 <- "block_ids"
2015-Jan-12 19:46:44.568504 [RPC0]6c
2015-Jan-12 19:46:44.568521 [RPC0]6f
2015-Jan-12 19:46:44.568538 [RPC0]63
@pmitchev
pmitchev / gist:fcee1345e20d70108e37
Last active August 29, 2015 14:13
Cryptonote RPC get_o_indexes.bin Python example
import binascii
import requests
import struct
def main():
packed_data_tx = struct.pack('@I I B', 16847105, 16908545, 1) # signiture
packed_data_tx += struct.pack('@B B 4s', 4, 4, "txid") # type?, length, text
packed_data_tx += struct.pack('@B', 10) + bytearray.fromhex("80") # type, strarray?
packed_data_tx += bytearray.fromhex("f579ff2174f828b6619a70d791db5297c9769c3e3cf06afb99e364f2bfa94c9f")
{
"daemon_name":"dashcoind",
"CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX":72,
"P2P_DEFAULT_PORT":29080,
"RPC_DEFAULT_PORT":29081,
"MAX_BLOCK_SIZE_INITIAL":"25 * 1024",
"CRYPTONOTE_NAME":"dashcoin",
"SEED_NODES":"\"162.243.247.45:29080\", \"146.185.191.90:29080\", \"104.131.132.129:29080\", \"128.199.146.243:29080\"",
"CHECKPOINTS":"{28000, \"70d2531151529ac00bf875281e15f51324934bc85e5733dcd92e1ccb1a665ff8\"}, {40000, \"c181ec9223a91fef8658c7aa364c093c41c28d250870ca1ed829bf74f0abf038\"}, {55000, \"5289fe9f2dce8f51441019b9fbc85c70ad85ff49a666ef0109f3269890c6af6d\"}, {70000, \"193e335f34b8b8f1fab3857111cb668c2720340e80176a25155071e573481acb\"}, {87500, \"cce8a035f34457ec1098ab41e5949cac3db00ebff3503e26f36bfa057543095a\"}, {91453, \"ad46d069bb2726a9bc5962cda6b2108376c0b95c157da0f09ee32458f486d87f\"}",
"UPGRADE_HEIGHT":91452,
@pmitchev
pmitchev / gist:90c4da8578168791043c
Created October 14, 2014 09:57
Dashcoin pool payment config
"payments": {
"enabled": true,
"interval": 30,
"maxAddresses": 5,
"mixin": 3,
"transferFee": 1500000000,
"minPayment": 1000000000000,
"maxTransactionAmount": 50000000000000,
"denomination": 100000000000
@pmitchev
pmitchev / gist:cdf97d3c81bc322d18c4
Created May 6, 2014 11:49
Liquid Templating: Truncate N paragraphs
{% assign truncatedContent = '' %}
{% assign paragraphs = post.content | split:'</p>' %}
{% for paragraph in paragraphs limit:N %}
{{ truncatedContent | append: paragraph }}
{{ truncatedContent | append: '</p>' }}
{% endfor %}