Skip to content

Instantly share code, notes, and snippets.

Avatar

Li lin myrual

View GitHub Profile
@myrual
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);
View press.one
https://press.one/p/v?s=e822a488a3769024448884762f953f6a3a8d005abce01ef3ff00d4626c4709c462e9b104a3fea195feb82ab91bcc3860dc75c8e6f66b2fde299e7a3bf80be1cb00&h=a39569d994303dde2221ab6d8b31769be38778b11e69d191fa6dbf8d2d407bfc&a=c62f9f9fac804f85ad9613180a2018c1d7e95798&f=P1&v=3
@myrual
myrual / setup_spb_mixin.md
Last active May 27, 2019
process to setup sub in mixin
View setup_spb_mixin.md

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
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",
View reorg_bitcoin.py
# https://twitter.com/cz_binance/status/1125996194734399488
# 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
View python_tuto_3.md

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:

View python_tuto_2.md

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

app.py

from mixin_ws_api import MIXIN_WS_API
from mixin_api import MIXIN_API
import mixin_config
View python_totu_1.md
@myrual
myrual / Mixin_main_net_full_node_introduction.md
Last active May 19, 2019
Mixin Network Full Node and main net introduction
View Mixin_main_net_full_node_introduction.md

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 Jan 19, 2020
Mixin Network上线计划和细节
View Mixin_Network_Node_Plan.md

主网上线日期

2019-02-28 00:00:00 UTC

会有哪些节点

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

如何启动

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

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

You can’t perform that action at this time.