Skip to content

Instantly share code, notes, and snippets.

@myrual
myrual / Mixin_main_net_full_node_introduction.md
Last active May 19, 2019 23:49
Mixin Network Full Node and main net introduction

When Mixin main net will be online

2019-02-28 00:00:00 UTC

Who is behind the first nodes group?

Mixin development team will select professional team to build the first 7 nodes.

In fact 15 genisis node.

How the main net start up

Information of the first batch nodes will be written into genesis.json of Mixin Network. The network will start work before 2019-02-28 00:00:00, and first snapshot will be generated on 2019-02-28 00:00:00. The first 15 nodes connect to each other, communication is proteced by whitelist IP and port.

@myrual
myrual / Mixin_Network_Node_Plan.md
Last active June 8, 2023 14:15
Mixin Network上线计划和细节

主网上线日期

2019-02-28 00:00:00 UTC

会有哪些节点

技术实力较好的团队在上线前集中沟通,选出 7 个预选节点

如何启动

7个预选节点提前写入 genesis.json 文件中,会提前启动网络,由于在网络中固定写好了上线精确时间,所以可以保证在上线精确时间产生第一个 kernel snapshot。为保证节点网络一开始的安全和稳定,会推荐所有节点之间配置私有的通信防火墙。

什么时候开放其他节点加入

@myrual
myrual / how_mixin_node_verify_transaction.md
Last active December 18, 2018 09:38
A short introduction to verify transaction

This is a short introduction for Mixin Kernel. It explain how Mixin Kernel verify a transaction. Code repo

When a new transaction first arrived at the Mixin Kernel node, the following steps will happen.

  1. Code: kernel/queue.go#L11. This code just do plain raw transaction format validate e.g. version, extra size, check the input total amount equals output amount, validate the signatures for each input and ensure the UTXO is not spent yet.

  2. Code: kernel/queue.go#L19. This is a standalone loop thread to poll all the queued transaction in step 1 to ensure that all transactions are processed in a single thread, because step 1 is called by RPC from many different connections.

@myrual
myrual / cross-site-xmlhttprequest.py
Created September 29, 2018 13:25 — forked from victoroliv2/cross-site-xmlhttprequest.py
web.py server which allow cross-site xmlhttprequest
import web
urls = (
'/(.*)', 'Service'
)
app = web.application(urls, globals())
class Service:
def GET(self, name):
web.header('Access-Control-Allow-Origin', '*')
@myrual
myrual / aaaaaa
Created September 12, 2018 14:58
adfasdf
F2463C7A38515DE3A2F9DC0BDC5C0373FDC27FB4035FFCF37FDDD5B8087E206A
@myrual
myrual / bnettoken.sol
Created May 29, 2018 09:32
b.network
pragma solidity ^0.4.24;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
@myrual
myrual / mixin_asset_list.py
Created May 23, 2018 03:19
an example for read user asset list
# -*- coding: utf-8 -*-
import web
import json
import requests
import jwt
import datetime
import calendar
import hashlib
import base64
import Crypto

开发者接入Mixin Network说明

步骤

1. 开发者自己创建一个mixin 账户

https://mixin.one

2. 开发者使用注册的mixin账户创建App并进行配置

{"sig":"84d8690d4a57eea45e2bda1ed9426354b5e4b16190e20f7ef6669393f65ebf4320b5a2a43e18c94ed569a0113ec8af39adfaeb7bd87edd9540f62b79fef7d6d40","msghash":"52a102aeb6e63fd26ab6d8e5545b6f1160e4af4d7d4ed90386764c13cfd1720c"}
{"sig":"94c86321d7dd15bd10ea439e603c0d7fdefd6c8ae82e40d48aa157a58b5089dcdf948f107a555b6918bc5d50995caa8913861cbeef8f4e420f14753ccbd31e3f1","msghash":"6bfa4dc578d9b09098fc344f7a01e0c9fda000b197be62ef852d827aa6d0498e"}