ProTradex普瑞緹PRT智能合約系統(tǒng)開發(fā)詳情說(shuō)明丨ProTradex普瑞緹PRT智能合約開發(fā)源碼
區(qū)塊鏈通過(guò)時(shí)間戳保證每個(gè)區(qū)塊依次順序相連,而這個(gè)時(shí)間戳就像數(shù)據(jù)的生產(chǎn)日期,證明這個(gè)數(shù)據(jù)在什么時(shí)間點(diǎn)就已經(jīng)存在,時(shí)間戳是區(qū)塊元數(shù)據(jù)的一部分,這使得區(qū)塊具有天然的時(shí)間屬性。隨著區(qū)塊鏈架構(gòu)體系的不斷發(fā)展,越來(lái)越多的研究對(duì)區(qū)塊進(jìn)行改造從而實(shí)現(xiàn)了對(duì)空間屬性的支持。
因此,區(qū)塊鏈技術(shù)可以為數(shù)據(jù)打上時(shí)空標(biāo)簽,通過(guò)在區(qū)塊中加入數(shù)據(jù)的時(shí)間和空間信息,將同樣內(nèi)容的數(shù)據(jù)集標(biāo)識(shí)為不同的數(shù)據(jù)集個(gè)體,從而解決了數(shù)據(jù)要素流通中數(shù)據(jù)集可以被無(wú)限復(fù)制而無(wú)法辨識(shí)的難題,實(shí)現(xiàn)數(shù)據(jù)來(lái)源可確認(rèn)。
區(qū)塊鏈的可追溯性來(lái)源于區(qū)塊鏈數(shù)據(jù)結(jié)構(gòu)的特殊性。
在區(qū)塊鏈系統(tǒng)中,它的鏈?zhǔn)浇Y(jié)構(gòu)是從創(chuàng)世區(qū)塊開始的,開發(fā)說(shuō)明:I35邏輯7O98詳細(xì)O7I8,其后系統(tǒng)產(chǎn)生的所有區(qū)塊都通過(guò)父區(qū)塊的哈希值前后相連,并最終能追溯到創(chuàng)世區(qū)塊。由于每個(gè)區(qū)塊都包含一段時(shí)間內(nèi)系統(tǒng)進(jìn)行的所有交易數(shù)據(jù),因此完整的區(qū)塊鏈數(shù)據(jù)包含了自創(chuàng)世區(qū)塊以來(lái),系統(tǒng)所有進(jìn)行的交易及交易前后的關(guān)聯(lián)信息。同時(shí),得益于區(qū)塊鏈信息的不可篡改特性,使得這種可追溯性是可靠可信的。
desugar item:AST->AST=
match item{
AssemblyFunctionDefinition('function'name'('arg1,...,argn')''->'('('ret1,...,retm')'body)->
<name>:
{
jump($<name>_start)
let$retPC:=0 let argn:=0...let arg1:=0
$<name>_start:
let ret1:=0...let retm:=0
{desugar(body)}
swap and pop items so that only ret1,...retm,$retPC are left on the stack
jump
0(1+n times)to compensate removal of arg1,...,argn and$retPC
}
AssemblyFor('for'{init}condition post body)->
{
init//cannot be its own block because we want variable scope to extend into the body
//find I such that there are no labels$forI_*
$forI_begin:
jumpi($forI_end,iszero(condition))
{body}
$forI_continue:
{post}
jump($forI_begin)
$forI_end:
}
'break'->
{
//find nearest enclosing scope with label$forI_end
pop all local variables that are defined at the current point
but not at$forI_end
jump($forI_end)
0(as many as variables were removed above)
}
'continue'->
{
//find nearest enclosing scope with label$forI_continue
pop all local variables that are defined at the current point
but not at$forI_continue
jump($forI_continue)
0(as many as variables were removed above)
}
AssemblySwitch(switch condition cases(default:defaultBlock)?)->
{
//find I such that there is no$switchI*label or variable
let$switchI_value:=condition
for each of cases match{
case val:->jumpi($switchI_caseJ,eq($switchI_value,val))
}
if default block present:->
{defaultBlock jump($switchI_end)}
for each of cases match{
case val:{body}->$switchI_caseJ:{body jump($switchI_end)}
}
$switchI_end:
}
FunctionalAssemblyExpression(identifier(arg1,arg2,...,argn))->
{
if identifier is function<name>with n args and m ret values->
{
//find I such that$funcallI_*does not exist
$funcallI_return argn...arg2 arg1 jump(<name>)
pop(n+1 times)
if the current context is`let(id1,...,idm):=f(...)`->
let id1:=0...let idm:=0
$funcallI_return:
else->
0(m times)
$funcallI_return:
turn the functional expression that leads to the function call
into a statement stream
}
else->desugar(children of node)
}
default node->
desugar(children of node)
}