Living a Simple Life is a Happy Life

Been here so long got to calling it home.

比特币POW难度调节分析

| Comments

比特币白皮书在工作量证明章节中解释了工作量证明(PoW)的方式:

我们在区块中补增一个随机数(Nonce),这个随机数要使得该给定区块的随机散列值出现了所需的那么多个0。我们通过反复尝试来找到这个随机数,直到找到为止,这样我们就构建了一个工作量证明机制。只要该CPU耗费的工作量能够满足该工作量证明机制,那么除非重新完成相当的工作量,该区块的信息就不可更改。由于之后的区块是链接在该区块之后的,所以想要更改该区块中的信息,就还需要重新完成之后所有区块的全部工作量。

那这个随机数难度值是怎么产生的呢?

央行抵押补充贷款PSL浅析

| Comments

看到一则新闻,山东取消了货币化安置奖励,美其名曰控制房价,其实想想就明白是政府余粮不足了,房价飞涨,补贴不能。

老家这里的棚户改造轰轰烈烈搞了两年了,货币化安置的效果非常显著,周边的房价一个劲往上涨。我就有点纳闷了,这个货币化安置的钱是从哪儿来的呢?

Coincheck被盗5亿个XEM

| Comments

2018-01-26,Coincheck 被盗 5 亿个 XEM, 这个数目估计是史上最大了,hacker 的账户地址是这里:

http://explorer.ournem.com/#/s_account?account=NC4C6PSUW5CLTDT5SXAGJDQJGZNESKFK5MCN77OG

按照 coinmarketcap 的市场价来算,现在 5 亿个 XEM 价值大概 4 亿美元

另外可能是 coincheck 自己的防护,他们的 Ripple 钱包也有一笔大额的转账:

https://xrpcharts.ripple.com/#/transactions/FC32DBF1C0CE6780A669349FEDF7BD9EC18033EB79B3DC8F1ADBAE9B5EAD3EF8

有将近 1 亿个 xrp 转账到了一个地址,这个地址貌似有 30 亿个 xrp.

这笔转账可能是 coincheck 正在审计,不是 hack 行为。

除去 MTGOX 那次,Coincheck 的这次悲剧不论数量还是市场价格估计都是史上最强了

2018-01-28, Coincheck公布了补偿措施

http://corporate.coincheck.com/2018/01/28/30.html

共损失 52300,0000 个 XEM,按照被偷时的币值返还,每个币 88 日元

额,貌似总额超过 25 亿人民币了

最奇怪的是,直到2018-02-01,市场才起了反应,开始下跌。

这个赌博的场子越来越让人看不懂了。

How to Penetrate GFW With ShadowSocks Docker Container on Centos7

| Comments

The quickest way to Penetrate GFW With ShadowSocks(Docker Container) On Centos7.

Install Docker CE

1
2
3
$ sudo yum install -y yum-utils   device-mapper-persistent-data  lvm2
$ sudo yum-config-manager    --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
$ sudo yum install docker-ce

start docker

1
sudo systemctl start docker

pull shadowsocks container

1
sudo docker pull oddrationale/docker-shadowsocks

start shadowsocks service

1
sudo docker run -d -p 1984:1984 oddrationale/docker-shadowsocks -s 0.0.0.0 -p 1984 -k $SSPASSWORD -m aes-256-cfb

You can configure the service to run on a port of your choice. Just make sure the port number given to Docker is the same as the one given to shadowsocks. Also, it is highly recommended that you store the shadowsocks password in an environment variable as shown above. This way the password will not show in plain text when you run docker ps.

For more command line options, refer to the shadowsocks documentation

windows Client

Client is the machine you want to bypass the GFW.

Download the client package Shadowsocks-win-latest-release, extract it, and run.

You can check its “System Proxy” option, which is convenient for all browsers and terminal.

now enjoy it

Game Theory

| Comments

看网易公开课的博弈论,很有意思,记下笔记:

导论-五个入门结论

  1. don’t play a strictly dominated strategy

  2. rational choice in case lead to outcomes suck

  3. you can’t get what you want ,till you know what you want

  4. put yourself in others’ shoes and try to figure out what they will do

  5. most people are evil

How to Config Samba Config With No Password Share

| Comments

年老记忆力下降,做了N+1遍了,还是忘。

卸载干净

apt-get purge samba
rm -rf /etc/samba /etc/default/samba

重装

apt-get install samba

配置

vim /etc/samba/smb.conf


[share_name]
public = yes
browseable = yes
path = /home
guest ok = yes
read only = no
writeable = yes
create mask = 0644
directory mask = 2777

重启

systemctl restart smbd