Skip to content

Instantly share code, notes, and snippets.

myrual / check_af_alg.c
Created Oct 10, 2019
code to check linux kernel support af_alg
View check_af_alg.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/if_alg.h>
#include <errno.h>
int main(){
//Alternatively you can set the path to argv[1]
int sockfd = socket(AF_ALG, SOCK_SEQPACKET, 0);
myrual /
Last active May 27, 2019
process to setup sub in mixin

ubuntu without root

Update ubuntu

$ sudo apt -y update
$ sudo apt-get -y upgrade

install PG

$ sudo apt -y install postgresql postgresql-contrib
$ /usr/lib/postgresql/10/bin/postgres -V
myrual / How_to_Node__receive_and_send_bonus_to_Messenger.txt
Created May 9, 2019
Cedric write a manual for node operator to withdraw XIN bonus to Messenger ID
View How_to_Node__receive_and_send_bonus_to_Messenger.txt
首先构造一个基本的 raw transaction 格式如下
"version": 1,
"asset": "a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc",
"extra": "34366362393932382d653636632d343966392d386165632d366462366137346666663638",
"outputs": [
"type": 0,
"amount": "115.06849309",
# block2reorg
# If you want to remove one transaction six block ago,
# there is one solution:
# buy more than half of Bitcoin hash power, calculate all transaction again, until you become the longest chain and all full node accept it
# Diff is the block you want to re-org
# k is your hash power/other hash power
# x is the block you need to generate
# diff = kx - x

We have created a bot to echo message and echo Bitcoin.

What you will learn from this chapter

  1. How to create Bitcoin wallet
  2. How to read Bitcoin balance
  3. How to send Bitcoin with zero transaction fee and confirmed in 1 second
  4. How to send Bitcoin to other wallet

Create a Bitcoin wallet by Mixin Network Python SDK

Pre-request: You should have a Mixin Network account. Create an account can be done by one line code:


In the previous chapter, we created our first app, when user sends "Hello,world!", the bot reply the same message.

Receive and send Bitcoin in Mixin Messenger

from mixin_ws_api import MIXIN_WS_API
from mixin_api import MIXIN_API
import mixin_config
myrual /
Last active May 19, 2019
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 /
Last active Jan 19, 2020
Mixin Network上线计划和细节


2019-02-28 00:00:00 UTC


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


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