[B.D.單身日記] 四月十九,星期四,天氣晴。我在洄瀾。

對,我在這個海與山擁抱的地方,在這個望向廣闊太平洋,背靠挺拔中央山脈的小城裡。洄瀾,這個清麗的小城,望文生義,你可以看到「水流回轉的波瀾」的澎湃壯闊。這美麗的名字,後來再轉成閩南語諧音的「花蓮」。

噢,是的,我在現在大家稱為花蓮的地方。

DSC_4714.JPG

有點突然,有點任性,有點想,突破生活的節奏,或許,也是一種沈潛與放逐,可以好好想一想,下一步的人生。

反正我單身嘛,難怪可以這麼輕鬆成行,昨天才決定,馬上就請假,一早在台北搭上普悠瑪號,很快地穿越在青綠山嶺與無止盡的隧道之間。一小時後,穿山而出,來到美麗的蘭陽平原,太平洋就在眼前。普悠瑪繼續前行。

這是一班上車後就是『下一站,花蓮』的直達車。

於是列車行於山與海所孕育出的三角平原上,在初春仍帶怯意的陽光裡,很快地,走到平原最南的蘇澳之後,再次進入山巒之中,南澳,布洛灣,太魯閣,然後再次穿山而出,到達花蓮平原的新城。而此刻,花蓮已經在望了。

花蓮(知道它舊名洄瀾之後,多希望能夠改回來,但即便如此,花蓮這名字,也已經與我們的記憶相連結了),常被稱為「後山」,大概就是台灣後花園之意,這美麗之地,是許多台灣人的夢土。

其實,宜蘭、花蓮、台東,在很早的時候,都是具有後花園意象。只是後來,雪山隧道開通,宜蘭變得很容易到,似乎神秘感也下降了。而,「花東旅行」,一直是西半部台灣人(其實就是絕大多數)自小畢業旅行,就非常希望能去的地方。因為很美,因為很遠,又美又離家很遠的地方,就是好地方。

而要再細說一點的話,花蓮與台東,至少我個人,是更偏好花蓮不少的,而我所說的花蓮,有六分是指花蓮市區,四分是其他花蓮縣,只是,其實是分不開的。

我在旅遊時,特別喜歡那種既有一點城鎮,又處於自然風景美麗的地方。倒不是說我不喜歡去那種深山僻壤那類地方,我也喜歡,但那種地方絕對很美,但卻會耗很多能量,要準備很多,要應付突發情況,要有「願意為美景而死」那種激情。

而我偏懶,你大概也知。最好就是,我能夠有地方躲起來舒服,等我休息夠了,出門不用多久,就是美麗的自然。剛好,台灣就有非常多這種地方,因為這是一個高山林立,四面是海的島嶼。真要說的話,台北也是四面環山,不需要跑太遠,就有好景觀的城市,例如陽明山。

但是畢竟台北太過繁華,我需要的是小一點的城市,小鎮。也許不是每一眼都能看見青山,但一天總能看到好幾回。在這種條件下,台北就不是,而花蓮就是了。花蓮市,該有的都有,也有很接近大城市的小小熱鬧區,但車子五分鐘十分鐘之內,你一定得見山碰海過河等等的。

視線是不受拘束的,看得見,你就感覺到它們都在那裡等著你,即使現在不去,也有一種幸福感。

這一次來,可能待個兩三天。會見一個移居花蓮的朋友,除此之外,就是在這裡 ….

存在。

吃路邊小食的存在,回想好多年前來的印象的存在,按著Google地圖尋寶咖啡廳寫文章的存在,一定得再去個起碼兩次的液香扁食的存在,一早醒來意識到自己人在東海岸的存在,把自己重新接回人生該有的存在樣貌的存在。

我不是遊客,我也不是當地人。我是花蓮的老友,多年後再來,希望她溫暖擁抱我,給予我一個可以產生能量的角落。

喔,對,支持地震後遊客銳減的花蓮,也可以,也無妨,只是怕我擔不起這美名(畢竟還是想省錢哪 ><)。但這裡東西,常常很便宜,支持的了嗎?還是我應該去吃比較貴的地方?^_^

先給你們看看今日消費。

蒸肉圓加四神湯。四十加四十,八十元。午餐一。

DSC_4715.JPG

DSC_4719.JPG

DSC_4718.JPG

應該是新移民帶來的東南亞料理,牛肉河粉,八十元。午餐二。

DSC_4728.JPG

DSC_4730.JPG

冰橘子綠茶,大杯,只要五十。還有舒適座位,無線WIFI,音樂。落地窗與街景,無價。

DSC_4748.JPG

DSC_4750.JPG

晚上訪友去。

B.D.單身日記,花蓮現場,為您帶來第一手報導。敬請持續鎖定。


[B.D.單身日記] 緣起請詳[第一篇:重返”單身”



This page is synchronized from the post: ‘[B.D.單身日記] 四月十九,星期四,天氣晴。我在洄瀾。’

Steemit Weekly for CNers - Issue 25 / 《社區"週"邊事》 - 第 25 期

https://i.imgur.com/2Qlx6uK.png

The Steemit Weekly series initiated by @deanliu and @wilkinshui aims to bridge the gap between the whole community and the CN-subcommunity by summarizing important events, projects, announcements and etc on Steemit in the past week and present them in a concise way in Chinese for all CNers to keep up-to-date with others out there. We sincerely hope that this little act benefits Steem as a whole as well as the development of Steem-CN for many years to come.

第 25 期 | 19 April 2018



——





###
STEEMIT 動向 / Apps 消息

Introducing Steemia - A new mobile app to access the Steem Blockchain!

by @steemia-io

目前Steem 的手機應用程式也在百花齊放,繼上週介紹的 bsteem,本週又有Steemia。它的特色是付帶書籤功能讓你把有趣的文章儲存起來。要留意它會收取15% 的發文費用。好處是其中 5% 會用來設置機械人再回饋使用者。


Introducing DNGO and DNGO Books: Create Audiobooks, Get Rewarded and, Tell us to Whom to Make Donations!

by @dngo-io

DNGO 是一個利用 Steem blockchain 去鼓勵用家製作聲效書來換取回報。作者認為利用 Steem Blockchain 可以讓大眾免費得到音效書的資源同時作者也可以得到報酬。目前他們正接受各方的捐款,如果覺得他們的理念好的話不妨捐獻給他們。


其他社區的發展


25 Reasons Steem Will Replace Bitcoin as #1 Cryptocurrency by 2021!

by @jerrybanfield

有沒有人對於Steem未來發展有所疑慮的?有所擔憂的?不看好的?喔,還是有的啊!那來來來,社區名人Jerry要給你25個2021年前,Steem超越比特幣,成為世界第一加密貨幣的理由!哈哈哈,無論你是否看多,看完還是多少會強化你對於社區的信心喔!(非投資建議….)


My thoughts on the London Cryptocurrency Show - What happened and what we achieved!!!

by @anarcotech

今年 London Cryptocurrency Show 的花絮出爐了。有超過 1500 名投資者 / 加密貨幣愛好者在這次的展覽對 Steem 的 ecosystem 更為認識。其中Utopian,eSteem等也協助推廣 Steem。值得一提還有 APPICS 的出席。看來不久便可以看到 SMT 誕生。


All your favorite Steemians sing “Shape of you” on a DLive exclusive!

by @anomadsoul

> 40 名的 Steemians 透過網上科技在剪輯,一起合唱名曲 “Shape of you” 。好不好聽當然是見仁見智。可是絕對能讓大家更能連結一起。 CN 區的我們也可以考慮一下。

BuildTeam - Overview of Services and Opportunities in Q2 2018

by @buildteam

> @buildteam 一直在貢獻讓 Steem 的 ecosystem 更精彩,除開發了非常有名氣的 minnowbooster 和 steemvoter 外,更有外,更有跟運動相關的Steemsports。他們最近公佈了未來的發展計劃,有興趣可以去了解一下。

How you can fund your Steem Project

by @hyperfundit

> Steemit 從來不欠缺資金,只欠缺出色的點子。如果你有好的點子,你可以把計劃在discord 跟 @hyperfundit溝通,他們可能能為你提供建議和資金來源,來讓你的美夢成真啊!

關於〈社區週邊事〉

〈社區週邊事〉是由 @deanliu與 @wilkinshui 發起合作,我們將會定期總結整個Steemit社區所發生的重要事件或項目進展等,例如Steemitblog的新公告,社區重要人物的談話,社區重大事件或活動,Steem重要Apps的發布與進度,其他Steem相關社區的發展新動向,或是一些界面的更新等。主要目的是希望協助各位CN區的朋友們,能夠以更有效率的方式掌握社區動態,讓大家能夠不只是來發帖賺錢,也不要只單單關注CN區內部的消息動態,好好利用這一平台的國際化特色,與其共同成長。另一方面,也期許大家多多以此為基礎,去向外互動與發展,促進CN區與大社區的和諧共榮。

Disclaimer - images from respective sources. please notify us if you do not wish to share the image and accept our sincere apology for not asking you in advance as we do not have enough time to ask permissions one by one; logo and boarders designed by @nicolemoker.


This page is synchronized from the post: ‘Steemit Weekly for CNers - Issue 25 / 《社區”週”邊事》 - 第 25 期’

[寓言] 市集之爭(上)

ludwigsburg-germany-2779468_640.jpg

遙遠的A村裡,有一個農民市集B,經營得有聲有色的。村民們平常都上這市集B去買生鮮蔬果與日常用品等,或是如果自家種的農產品還是養豬養雞養泥鰍的,也都會選擇到市集B來賣自家貨品。

市集B是一個年輕人Z做起來的,他眼光精準,預見了半年前因為鄰村村長說要實施社會主義不給買賣了所以就很多人移居到A村來的這一波大移民潮,提早招兵買馬,把市集的基礎建設給提前弄好。果然,移民潮到後不久,市集B就迅速竄上村民買賣的首選之地。

想到市集B來買或賣,都得從交易裡抽點手續費,但Z發行了市集B的股份,如果你有買入這些股份,則可以用來抵扣手續費,還給你打折。而且這些股份還能分享市集經營的利潤呢!

村民們日常生活裡主要會買的大米啦,豬肉啦,在這裡買賣交易量非常高,攤位前總是客滿,但那些各式青菜、各種水果、甚至鍋碗瓢盆的攤位上,也是不乏買家。

市集B裡,還常常舉辦交易比賽,買賣量大的村民,有時抽獎有時是發糖果,所以,除了一般村民是來買日常所需品之外,倒是整天窩在市集裡左手買右手賣的投機客甚至還更多一些呢 …

商業的世界,從不曾停止變化。

村里某個本來搭戲台的年輕人P,年紀輕輕就已經靠著搭戲台賺進一桶金了,出入都以藍寶駿馬代步,他去過這類市集買過東西,當時感覺不好,認為這些市集都沒好好認真做生意,把村民當成客戶來服務。因此,後來他不搭戲台了,也決定要自己來創造一個服務村民的市集。他想了一個絕佳的點子:進來買賣產品,完全免費,一毛不收。這平台且稱之為市集C。

不收錢怎麼玩哪?商業嘛,總是得找地方出羊毛。他的點子是,市場總是會有新產品上市要推廣販賣,這時候他的市集C的員工們,就來幫忙賣這新產品,然後從這裡面抽一部分的新產品當作收入。或是市集裡常常有些投機客,喜歡買空賣空,市集裡多半有錢莊部門,提供他們貸款,可以賺取一些利息。

市集C不收買賣手續費的想法,屬於業界首創,因此P心裡的美好圖像是:絕大部分村民都會到他這裡來買賣,畢竟,不收手續費,真的是一個市集能做到的極限了。村民買賣規模有了之後,一群村民在手,還怕找不出商業模式來賺取銀兩嗎?這真是高招!用一大絕招,帶動後續各招,且一旦做成,對手們也不容易競爭了。

很多村民買單這想法,心裡想到免費這兩字眼睛就直發亮,也因此多多少少買了市集C預發行的股份(對,零手續費那怎麼發股利?就是從推銷的新產品跟利息錢去張羅的)。市集C可說是萬眾期待啊~~~

不過呢,市集B硬是比市集C早了些時候搞好。人流貨流不斷湧入,市集C還在工地施工中,只希望那個大絕招能管用吧!

就在市集B滿缽滿盆地收錢之際,市集C落成了,開始運營了。可惜的是,一個月,兩個月過去,基本的市集功能都算是勉強到位了,人流並沒有出現,只有市集C股份交易攤位前人多一點,畢竟這是獨家販賣。市集C裡,四處掛著「免交易費用」的海報,跟冷清的人潮,形成強烈對比。雖然,在努力改進下,人流漸有起色,但跟當初的美好遠景,還差了十萬八千里呢!

這是腫麼了呢?大絕招怎麼沒發威呢?

村民D喜歡到處看熱鬧,沒事也到市集裡去買賣點東西。當初,她看市集C這想法挺牛的,還從床下藏錢筒掏了點錢認了一些股份。所以,沒事她就到市集C那邊去晃晃,從工地時期看到如今。市集B她也去買賣,所以,她回家種田煮飯菜之餘,也老在琢磨怎麼市集C就是起不來呢…

俗話說:「看久了,你就會略懂。」(出處待考)D後來也感覺自己或許略懂一二。讓我們來聽她說說。

村民上市集去買賣東西,最重要的,其實並不是交易費用,而是要有夠多的村民也去買賣,交易熱絡起來,那才叫做市場。否則,有行無市,再高明的人也沒辦法做生意的。

所以呢,去市集B買東西的不是笨蛋,他們都知道買賣要被收錢,買千抽五之類的費用。買賣多了,也是一筆錢。對於那些投機客來說,更是一筆不小的開銷。但是總比沒得買賣好啊!在市集C裡頭,也有村民,總有人吆喝說,嘿呀!聽說附近有個大養豬戶不做了,豬肉在市集B大漲價呢,賣到60塊錢一斤了!這馬上這裡現有一些豬肉攤上的貨就被搶光了,後續,豬肉商們都不太來這裡賣,因為這裡人少嘛!就算沒收交易費用,得有人可以賣才是關鍵哪!

D心想,如果有一天,就只要一天,上帝把這些村民都弄到市集C來買賣,那麼,他們一定就會留下來的。因為那一天,所有人都在這裡,買家賣家投機客村民全在,又不收你手續費,還有什麼比這更爽的交易環境呢?

可惜的是,上帝不做生意,祂更不會幫助特定人。所以,能有什麼招,能夠慢慢讓市集C有起色呢?

賣個關子,下集再來分享,村民D想到的招。

也歡迎圍觀群眾村民們,如果你們也想到什麼好的招數,可以協助市集C來打敗市集B呢?歡迎動動腦喔!

^_^

supermarket-949913_640.jpg

note - 本寓言不對應到現實世界案例,如有雷同,應該是巧合。

images - pixabay


This page is synchronized from the post: ‘[寓言] 市集之爭(上)’

Lightning Network: Scalable, Instant Bitcoin Transactions.

Hi investors, Dean (@deanliu) and Dan (@tradealert) are back and today we’re talking about the Bitcoin Lightning Network and how it could change the financial world as we know it.

maxresdefault.jpg

The Lightning Network (LN) is a scalability solution for the Bitcoin block-chain aiming at solving many of the issues that currently prevent Bitcoin from becoming a true global form of decentralized digital cash.

In this article we will first talk about the origin of Bitcoin and the problems that the network is currently facing (I). We’ll then explore how the LN will address these issues and talk about some of the technology’s most exciting applications (II). Finally, we’ll discuss some of the most common criticism which have been raised against the LN (III).

I- Problems.

The Bitcoin network was originally launched by the anonymous Satoshi Nakamoto in 2008 as a proof-of-concept for a revolutionary, decentralized financial network . Its first application was a distributed ledger allowing users to transact value trustlessly: bitcoin.

In these early days, the network was small and didnít require large blocks to process transactions quickly but as Bitcoin started to gain in popularity, so grew the congestion on the network causing fees to skyrocket and unconfirmed transactions to pile in the mempool.

hacker.jpg

The fee crisis reached a peak on December 22, 2017 when, at the apex of the Bitcoin bubble, a single transaction reached the price of $54 dollars while some users saw their bitcoin stuck on the block-chain for days.

Although fees have gone down considerably since ($1.5 at the time of writing), that episode was evidence that Bitcoin wasn’t ready to scale to Satoshiís original vision.

II- Solution(s).

The issue of scalability is a very divisive one and has already led to a split in the Bitcoin community when, in July 2017, a powerful group of miners and developers elected to fork off the legacy chain to create Bitcoin-Cash, a version of Bitcoin with bigger blocks (8Mb) and faster mining latency.

48749491-15155778136031818.png

Scaling the Bitcoin block-chain can be implemented in two different ways:

  1. by making on-chain transactions faster, either by increasing the block-size to allow more transaction to be mined in a single block or by reducing the latency between two mining events;
  2. by taking some of the transaction volume off the main chain onto side-chains or servers.

The “on-chain” approach chosen by Bitcoin Cash is heavily criticized by the legacy Bitcoin community which believes that increasing the blocksize will only lead to concentrating mining and node-running into the hands of only a few operators, eventually compromising the decentralized and trustless nature of the network.

The “off-chain” option is the one that relates to the Lightning Network.

maxresdefault.jpg

The Lightning Network (LN) is a potentially game-changing scalability solution wich is currently being implemented on the “legacy/Segwit” Bitcoin blockchain. Inspired by payment systems used by financial institutions, the LN is designed to allow Bitcoin to scale to billions of instantaneous, quasi-free transactions per second while preserving the decentralized nature of the network.

a- How the LN works.

At a basic level, the LN can be best imagined as a network of user-to-user payment channels secured by the Bitcoin block-chain.

2.PNG

A payment channels is a multi-signature bitcoin address shared by two users and managed by a smart contract. The smart contract is responsible for creating and managing an off-chain ìbalance sheetî which allows the parties to transact indefinitely or for a set amount of time. Once funded, this balance sheet can then be freely and instantly modified until the parties decide to settle their transaction by closing the channel (for a very tiny fee).

528e948fda31ac641e1abf178399ccd3.png

If any dispute arises between the parties, the smart contract will turn to the blockchain to automatically settle the payment and distribute the bitcoin. In this regard, the role of the blockchain is very much similar to the role of a judiciary court settling a dispute between two contracting parties.

Once created, payment channels can then be used to process payments originating from any user in the network. The system is optimized so a payment from user A will hop its way through the network to user B; using existing payment channels or automatically creating new ones as it goes along but always taking the shortest and cheapest route similarly to how packets of information are routed on the internet.

In practice, this technology will allow anyone to send instant, cheap payments of any size to anybody on the planet through a simple exchange of QR codes, all in a secure, entirely trust-less and permission-less fashion.

If you wish to know more about how the LN works, I recommend you watch this great video from Savjee’s YouTube channel:

https://www.youtube.com/watch?v=rrr_zPmEiME

The Lightning Network is currently in development on the Bitcoin test-net and is expected to roll-out on the main-net sometime during the year 2018.

PS: The deployment of the LN wonít require a hard-fork so be wary of fraudster who will certainly try to scam unsuspecting users as we near the launch.

Beside being an elegant scaling solution for the Bitcoin blockchain, the LN also allows for very exciting applications which could end up revolutionizing finance way beyond simple peer-to-peer payment channels.

b- Applications.

Although the LN is still very early in its development, its underlying technology already opens the door to a myriad of exciting applications.

1. Lightning Fast Mobile Wallets.

Mobile wallets will play a critical role in Bitcoin’s consumer adoption. In their current form, Lightning wallets are rather complex interfaces reserved for technical users. However, as the technology improves, so will their design and the user experience they provide.

Ideally, the Lightning wallets of the future will hide all the complexities of the LN, letting users only interact with two basic Send and Receive options while the wallet processes transactions at the best possible price under the hood.

unnamed.png

One of the biggest improvement lightning wallets will bring is the ability for users to send micro-transactions to third-parties, merchants or service providers. One can imagine the wallets of the future automatically managing a whole range of services from tipping, to paying bills to micro-transact with IOT device, the possibilities are amazing.

If you wish to experience first-hand the power and speed of lightning wallets, there are currently two implementations we can recommend: Zap and Eclair, the last one being a mobile wallet on Android and MacOs. Be aware that these projects are still at an alpha stage of development and should be used only on the Bitcoin test-net, doing otherwise would expose you to a loss of funds if things start getting buggy.

Hereís a great video tutorial from Ivan on Tech’s YouTube channel on how to use a Lightning wallet:
https://www.youtube.com/watch?v=B5IPheyaNHA

2. Decentralized Exchange of Crypto-Currencies and Financial Assets.

Decentralize exchanges (DEX) are a very important part of the crypto ecosystem because they allow anyone to freely trade assets without the need to trust, or be authorized, by a third party. Many DEX solutions have already been implemented on other blockchains. The most popular being WAVES, EtherDelta or 0x protocol-based DEX like Paradex or Radar Relay.

pros-cons.png

For a long time, DEX solutions weren’t practical to implement on Bitcoin. Projects like Coloured Coins or Counterparty for example pioneered the idea of transacting traditional financial assets (like securities) on the Bitcoin blockchain. However the problem these projects encountered was that renting security services from the Bitcoin blockchain to secure assets and provide immutability also meant inheriting Bitcoinís limitations? in terms of transaction time and fees.

With the existence of the LN though, digitized financial assets like securities could theoretically be transferred P2p with no verification time, almost no fees and with the security offered by the bitcoin block-chain.

Traditional finance is a slow and fossilized industry so the transition from NASDAQ to DEX will certainly be an uphill battle (if it ever happens). Nonetheless, weíre starting to see forward-thinking fin-tech companies like Cinnober express interest in setting full-nodes on the LN with the goal of researching the technology and its possible applications in the traditional financial sector.

What-are-atomic-swaps.jpg

Another path to DEX are atomic swaps, a new technology which allows cryptocurrencies and digital assets to be transacted across block-chains instantly and for almost no fee.
Since most cryptocurrencies will in time implement atomic swaps and probably their own version of the LN (ex: Zcashís BOLT network or Litecoin’s own Ligthning Network), one can imagine a future where bitcoin will be used to instantaneously purchase services or assets managed on third party blockchains.

“Bob wants to diversify his financial portfolio which is mainly in Bitcoin. He decides to send some bitcoin over to the Tezos blockchain to buy digitized stocks and some to the Ethereum blockchain to buy a digitized fraction of a Picasso painting via the Maecenas app. Bob can do all this simply from his wallet, without any friction and for a fraction of a penny.”

The promise of the Lightning network and how it could revolutionize the way we think about finance are indeed tantalizing. However, the LN is not without issues and some of the criticism against it should be addressed.

IV-Criticism against the LN.

a- Will the LN create Bitcoin banks?

As we’ve seen, the speed and low fees of the LN will allow users to send microtransactions over the network. Microtransactions are easy to route through the network due to their small size, however bigger transactions need richer payment channels to be pushed through the network.

Some have predicted that this limitation will lead the lightning network to naturally produce large liquidity hubs akin to banks which over time will lead to yet another form of centralization on the network. This is a fair criticism but there are a couple of elements that might invalidate this prediction.

pros-cons.png

First, creating channels staked with massive balances of bitcoin expose stakers to serious risks of being hacked which is why itís likely that the network will actually organically decentralize itself into smaller-sized payment channels. In this configuration, large payments can still be routed through multiple smaller channels without sacrificing speed of security.

Second, even if the network does happen to foster some degree of centralization, smaller users could still be able to to stake their bitcoin with other users to create their own pool of liquidity and collect fees from the transaction traffic.

b- Will LN Node Operators be Subject to Anti-Money-Laundering (AML) Regulations.

This last concern is much more difficult to predict. In his YouTube Bitcoin Q&A series Andreas Antonopoulos notes that:

AML regulations only apply to flows of money greater than a certain amount […] Characterizing all [node operators] a banks is preposterous and would only lead to more stealthy implementation“.

Science-Law-icon.png

He also points that those fears already existed in the early days of Bitcoin but that none of the legacy node operators were ever prosecuted for running illegal money transmitting operations.

It’s worth pointing though that there is a regulatory risk here and as Bitcoin will gain in popularity and rise to challenge the traditional banking system we could see some regulators take a stricter stance on this issue. After all very few revolutions were ever conducted without a struggle and the financial disruption promised by Bitcoin is likely to provoke a lot of resistance from the traditional banking system.

Exciting times ahead.


_If you liked this post please consider supporting Dan’s blog @tradealert and if you’re interested in learning more about cryptocurrencies, come join our [awesome community on Discord](https://discord.gg/4VGVHrs). Don’t be shy, it’s free!!_

TA Discord.jpg

Also, make sure to go check out Dan’s latest review this time on SpankChain and his interview with Ernie from Trader of Futures.

Dan & Dean.


This page is synchronized from the post: ‘Lightning Network: Scalable, Instant Bitcoin Transactions.’

[B.D.單身日記] 與子偕老

[B.D.單身日記] 緣起請詳[第一篇:重返”單身”


sunset-3156176_640.jpg

轉眼,已經超過十天了。我想不想她們呢?自然是想的。但在依舊忙碌的生活裡,通常沒有空去想我想不想這回事,所以也似乎還好。

可能是還不夠久,也可能是我這人太冷血。不去想就沒事,通常都是這樣。

那麼,怎麼樣會有事呢?

就是被觸發的時候。看到街上年紀偏小的小孩,尤其是男孩,特別容易讓我想起兒子來。第一篇說過,不在時,特別適合來說說他們的意義。

所以,來聊聊有孩沒孩的差別吧!

我算是喜歡小孩的人(你可別以為大部分人都喜歡小孩,很多人覺得他們很吵又麻煩的),但即使如此,我在成為一個父親之前,可以說是完全不懂小孩的人,即便我老家的兄弟姊妹早已比我早有孩子,我跟他們只有偶而相處,也無法讓我提早認知,何謂身為父母。

沒孩之前,路上看到小孩子,只會把他們當成可愛動物(如果不是吵鬧頑皮到太誇張的話啦)。自己成為父親之後,透過自己跟自己孩子的那一段生育與養育過程,你才會開始對於「孩子」這種階級,有一種全新的感受。

沒孩之前,你會把小孩跟大人當成一樣的「對象」,大家都是人類,只是一個體型大懂事,另一個體型小孩還不懂事而已。頂多把小孩加上可愛動物特性。後孩階段,我看每個孩子,都會看到他們身上所散發出的一種「我是未來」的意象,更誇張地說,是「我是你的未來」的意象 …

或許我內心深處,一直有一種「小孩是全社會的共同資產」的想法,儘管是你生的,但不代表你可以對他們為所欲為。這不是所有權,這是一種責任,一種社會/人類賦予你的光榮的責任。你選擇生了,就得接受所有的社會合約內容。

所以,我對於看到路上在路邊不牽好小小孩的家長,對於後巷鄰居三天兩頭狂罵孩子,都感到十分憤怒。新聞看到孩子被虐待,不管是幼兒園或是家長,我都不太能看,得趕緊轉台。但台灣社會在這方面並不是太進步,孩子是家長所擁有的財產觀念還太重。

有一個我自己想出來的觀點,可以跟大家分享一下。還沒在哪裡看到過(是否在這裡說過,印象中沒有)。那就是 …

每個人都會老,越到後面你感受越深。但有小孩之後,你的老與他的長大,是同時進行的。因此,成為父母之後,對於自己的老化,會比較釋然,因為你的基因繼承者們,正在成長茁壯,而你對此是感到欣慰的。

反之,如果你決定不要小孩,那麼在應對老化方面,心態上你可能要另尋他法,例如宗教等,才能減輕你對於時光逝去的一種焦慮感。

這個觀點,我自己是覺得很有道理的喔 … 等你們變成父母之後,再來驗證一下。

然而現在,我兒子在歐洲長大著…. 我看不到,特別感到又繼續在老了。>_<

嗯,是不是該做點,年輕人才會做的事呢?

writing-2317766_640.jpg

images - pixabay


This page is synchronized from the post: ‘[B.D.單身日記] 與子偕老’

DA-ChainTalk #1 — State,從宏觀到微觀:以太坊如何將智能合約帶入區塊鏈世界

世界太新,用手去指。 ~~賈西亞•馬奎茲

我一直希望對於區塊鏈的某些技術細節,能有更深一層的了解,多於看百科層級的解說,而止於非技術人能夠理解的程度。Anton是一個蠻認真吸收技術新知的年輕人,於是我找了他一起合作,希望能一起找出有助於更多人理解這個區塊鏈新世界基礎的題目,主要由他來執筆,帶大家一起學習,一起用手去指。


background-3228704_1280.jpgsource-pixabay

State - 從宏觀到微觀:以太坊如何將智能合約帶入區塊鏈世界

前言 by @antonsteemit

前幾天劉美女發表的一篇文章 Art of STATE討論「狀態」的意義,今天這裡我們用一個比較不同的角度再來看看State,從比特幣UTXO模型以及以太幣Account-based模型對於宏觀State的紀錄,到智能合約的執行環境討論。

區塊鏈與宏觀的State

區塊鏈想做的,便是一個分散式的系統,這個系統紀錄了一個Global State,並且透過一個共識協議不斷更新,而這個State是全世界節點都能夠達成共識的。

如同劉美女所說的,可以將State看成一個對時間的函數:S(t) 指的是在t時間點區塊鏈的狀態,而S(t+1)就是下一秒的區塊鏈狀態。在許多討論中,也常常是以「每一筆交易」為單位在描述State:一個狀態S[i]在發生了任一個交易TX[i]之後,整個區塊鏈的狀態也會有些改變,成為S[i+1]S[i+1] = APPLY(S[i],TX[i]),會這麼表示是為了要表達一個節點在驗證一個區塊時,需要一筆交易一筆交易去改變State。

UTXO模型中的State

比特幣所使用的UTXO模型其實不是一種直觀的紀錄方式;在比特幣的世界裡,它只紀錄了所有的歷史交易條目:在確認一筆交易是否合法前,一個節點需要要驗證每一個Input來源Unspent Transaction Output是否真的存在,也就是要回頭看從創世到現在以來的每一筆交易,找到確實有這一筆可以拿來花費的Output。在這樣的模型中並沒有所謂「帳戶」概念,並不能像銀行一樣,直接從一個帳戶檢查餘額,然後輕易判斷交易有效性。

在比特幣的世界中,如果你要說他也有個「狀態」的話,沒錯,它的State就是從創世區塊到現在所有交易的集合。但是由於沒有一個物件隨時紀錄這個區塊鏈整體狀態的物件,而且一個UTXO交易只有SpentUpspent兩種狀態,無法表達其他任何其他狀態資訊,因此有許多人稱UTXO為Stateless。所以對於State的討論也是宏觀微觀之分的,大家可別搞混了呀!(我就是一直被這個搞混Orz)

以太坊的變革

以太坊的問世最重要的特點就是帶來了「帳戶」。它對每一個帳戶有了持續的紀錄,因次被稱為Account-based區塊鏈,也是一個較好描述區塊鏈狀態的模型。以太坊的State就是由滿滿的帳戶所組成,State的轉變其實也就只是帳戶之間訊息、轉帳的傳遞罷了。

帳戶 (Account) 與交易(Transaction)

為了進一步了解ETH帳戶模型的運作,我們要先了解帳戶以及交易(Transaction)的意義。在ETH中,帳戶又分為了個人帳戶(externally owned accounts)以及合約帳戶(contract accounts):

  • 個人帳戶:簡單的說,就是每個人透過私鑰控制,能夠存錢、送錢的私人錢包。
  • 合約帳戶:不同於個人帳戶,合約帳戶是受到智能合約(Smart Contract)控制。實質上他就是擁有Contract Code(合約程式)以及Storage(儲存空間)的帳戶,如果一個帳戶含有Contract Code,它就是一個智能合約地址,可以透過交易(transaction)來trigger,並且每次被啟動時按照合約內容執行。

其中「交易」特別指的是由個人帳戶所送出的簽名封包,可以是純粹的轉帳,也可以是拿來啟動智能合約的Function call。

State Transition Function

接著我們來看看,當一個Transaction發生時,整個State的變動過程。

(Image Source: Ethereum Whitepaper)

如果我們把左邊的State稱做S,經過交易TX之後變成S',這個過程可以想像成一個APPLY函數:APPLY(S, TX) -> S',而APPLY的運作流程如下:

  1. 檢查交易資訊是否完整:簽名是否有效、nonce(交易計數器)是否與帳戶紀錄相符。
  2. 計算所需要的transaction fee = GASPRICE * STARTGAS,從發送者帳下扣除該比fee費用。
  3. 初始化參數GAS=STARTGAS,再隨者交易每一步扣除GAS數量。
  4. 如果是一般交易,將發送者帳下的ETH轉到接收者帳下;若目標帳戶不存在,就創造一個新的帳戶。如果是合約交易,則運行智能合約的內容,直到合約結束或是GAS用完。如果發送交易者沒有足夠餘額或是GAS用完,則回傳ERROR,並且回溯剛剛的State改變,但是已經付出的交易手續費將一樣付給礦工。
  5. 如果交易成功且有剩餘GAS則還給發送者。

區塊驗證

在我們了解一筆交易對State的改變過程之後,區塊驗證的過程也變得較容易理解:在整個節點要驗證一個區塊時,需要驗證許多筆的交易,所以State的改變就會如下圖一樣,在每一個block的驗證過程都是一系列的交易驗證以及狀態改變。

因此在ETH的每一個block中,除了包含的交易列表外,還有一個Global State紀錄所有帳戶的餘額狀態。乍看之下,這個方法似乎很沒效率,因為State是一筆很大的資料,每次紀錄時其實有絕大部分的帳號餘額是沒有變動的。但是實際上在一個節點的運作中,它只要保留最新的State,而State是透過Patricia tree這種易於增加、修改、刪除的樹狀結構來儲存的,因此在實際執行上並不是很大的負擔。

Account Based 的優勢

驗證程序簡化

儘管一個Full-Node會記下每一個區塊的交易紀錄,但是在驗證一個新的區塊時,它只需要觀察最新的State並從中獲取所需的資料即可,存下的交易細目只是為了查詢而已,並不會參與驗證,因此驗證是比較單純的,不像UTXO模型中需要「溯及既往」。

智能合約變得可行

透過帳戶的方式管理合約,讓開發以及應用上都變得直觀。一個「合約帳戶」可以擁有自己的變數、Storage並透過智能合約來管理。如果沒有Account這個東西,我們連合約要放在哪裡都想像不出來了。如果沒有一個State存下了每個時刻「合約」的內容物以及狀態,那麼每次執行合約都要從頭跑過一遍才知道現在的狀態,顯然是不合理的,智能合約都變智障合約了。

圖靈完備(Turing-Completeness)

其實在比特幣的區塊鏈中也是有Scripting的,每一個交易的驗證都牽扯了簽名的驗證,這其實就是一個簡單的程式碼運行。但我們不會說比特幣是一個能夠運行智能合約的平台,因為比特幣的運算也不具有圖靈完備(Turing-Completeness)的性質。

圖靈完備指的是一台電腦或是狀態機(State Machine)擁有模擬圖靈機(Turing Machine)的運算規則或是程式語言;簡而言之就是擁有成為電腦的運算能力(這裡的運算能力只的並不是運算速度效能,而是能夠在有限時間內達成一台電腦能做的所有操作)。但在UTXO的Script當中,是不會允許迴圈(loop)存在的,因為迴圈的存在代表著有行程無限迴圈的風險,也就是一個永遠不會停下的合約。

那麼在ETH中為什麼可以避免無限迴圈呢?這就是GAS被設計出來的目的。當一筆交易要發起時,發送者需要先付出fee來付給幫忙運算的礦工,而每一步運算都要花費一定量的GAS,如果你的GAS用完了,那麼合約就會終止,不完整的State變化也會回溯。這麼做的好處顯而易見:避免惡意的攻擊以及落實使用者付費原則,讓所有人願意節省網路共同用算資源。有了GAS的限制後,ETH上的智能合約開發變可以支援一個圖零完備的執行環境了。

UTXO: Value Blindness

UTXO模型另一個缺點是他沒辦法有效的處理「Value」。在Account Based的世界中,只要我們錢夠多,我們可以轉任意數量的ETH給另一個帳戶。但在UTXO中我們不能只指定轉帳數量,我們需要找到足夠的Input,並且「湊」出我們的Output,這使任何牽扯到值變化的步驟都大大的複雜化。

State 的重要性

如同上面提過的,這是最重要的性質之一。在UTXO中沒有State紀錄每個帳戶的狀態,除了每次執行合約前都要從頭來過執行所有歷史紀錄以獲得初始狀態以外,在每次執行合約過程中,因為UTXO只有SpentUnspent兩種狀態,因此沒有辦法紀錄任何複雜的合約執行過程。

所以看到這裡,知道帳戶模型的厲害了吧!

利用Account Based的方式紀錄區塊鏈的State訊息,不但一石二鳥地有效紀錄了「宏觀區塊狀態」到「微觀合約執行內容」等等資訊,也更有效率地儲存了整個區塊鏈資訊、也簡化驗證過程。
其實UTXO仍然有這一些不錯的性質,例如可以平行處理多筆交易,使得有些新興區塊鏈底層仍然選擇使用UTXO,例如Qtum就是利用新的Value Transfer Protocal來在UTXO上面實踐智能合約(至於細節嘛…我還不是很了解)。所以,雖然說Account Based是將區塊鏈帶入智能合約時代不可否認的大功臣,但究竟哪個model會在未來的戰場上勝出,還是不好說的呀!是創新的UTXO厲害還是Account Based厲害就只能說見仁見智了!
無論如何,對於把這重大變革帶進區塊鏈世界的小神童Vitalik,還是受我一拜吧!
(Image Source: 香港矽谷網站)

最後,謝謝各位囉~

這是我與劉美女第一次合作,文章可能會被更多人看很緊張阿 ><。如果有任何要批評指教或是內容錯誤,或是希望未來我們討論什麼比較技術面的話題,還請不吝指教與提出喔!謝謝收看,下次再見!


This page is synchronized from the post: ‘DA-ChainTalk #1 — State,從宏觀到微觀:以太坊如何將智能合約帶入區塊鏈世界’

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×