-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


- -

, 13 2017 . 10:19 +

22 2017 Blockchain & Bitcoin Conference - , , -.

20- . habrahabr .

, -. , . gelbplaneten.

, , , .

: ( ) - . -.

: -, () : API . , , .

, , .

. . . , . , .


2016 R&D. , , .

: - . , .

. , .

: -
, . , .
: , .

:
  1. , .
  2. .
    (, ). .
  3. . .
  4. , (-, , ..) .
  5. .

.


, - . , . , .

, , Ethereum. .

, , , API . , , . , - (), -, (, , , ).


, -. , , : , , .

, . , .

:
  • ()
  • ( )





image

:
  • -,
  • (DFS) ,
  • , . , , DFS .
  • ( )
  • .

, -, - , . ( ) ( ) ( ) , .

- :
  • ,
  • ,

:
  • Ethereum-,
  • -, ( )

: blockchainhub.net/blockchain-oracles
DFS , Swarm: swarm-guide.readthedocs.io/en/latest/introduction.html
Storj: storj.io


( , , ):

image
:
  • (, - ). , - - -. , - , , - , , - . - , , .
  • - () . -, . - DFS, - , (, ) , DFS. - DFS, ( ) .
  • - -, , , ..
  • - . - . - .
  • , - - .


-


- .

,

image
, . , . , , , .., (, ). .
  1. - ( ), New.
    .
  2. , , - , .
    InBank.
  3. ( ) ( ) . , , , (, , ..)
    - , Rejected.
    Confirmed.
  4. , , ( , ..)
    - ( ), New.
    .
    , , .
  5. ( ) , Released.
    Released.
    Released :
    • (, )
    • ( )
  6. : Invalid, , .
    Invalid.
  7. Overdue .
    Overdue.
    , ( , ..)
  8. ( , ) InBank. InBank .
    , , ( ).
  9. Closed.
    Closed.
  10. .



(Ethereum, Swarm, Storj). :
  • ,


image
, :
  • - Ethereum Solidity;
  • Swarm Storj.io;
  • ;
  • - ;
  • ;
  • , - , .


:
  • Ethereum, Swarm Storj.io,
  • ,
  • ,
  • UI-,

2 .

Ethereum -. Ropsten, Rinkeby. DDOS Ropsten, .
, :
  • DFS Storj.io
  • DFS Swarm Ropston Ethereum

, .

, , .

UI- , - .


Ethereum


Ethereum RPC API JSON-RPC, Management-APIs.

.

ropsten.etherscan.io rinkeby.etherscan.io, .

Swarm


Swarm HTTP API: Swarm-guide, gist.github.com.

SWARM HTTP- PUT /bzz: $PATH$ ($PATH$ )
16- , SWARM.

SWARM HTTP- GET /bzzi:/$MANIFEST$/ ($MANIFEST$ 16- ).

- / .

, Swarm ( Etherscan Ethereum), .

Storj.io


Storj API . Storj.

storj upload-file $BUCKET$ $PATH$ ( $BUCKET$ , $PATH$ ).
.

storj download-file $BUCKET$ $FILE$ $PATH$ ( $BUCKET$ , $FILE$ , $PATH$ ).

Storj , , .

https://api.storj.io, API.


COM-. vbs.


- .
image


:
  • 32- (64- hex), 20 (40 hex) , , .
  • 32- (64- hex), .


- , : GetExternalRequest, SetExternalResponse CheckExternalResponse.

, , :
  1. AddRequest - RequestsQueue, .
  2. () - RequestsQueue GetRequests .
  3. GetExternalRequest :
    • (, DAILY 10:00 PERIOD 20)
    • (, CALENDAR DADATA_NAME_EXISTS)
    • , (, DADATA_NAME_EXISTS)
  4. .
  5. , , , SetExternalResponse .
    .
  6. CheckExternalResponse, .
    :
    • FAIL ,
    • REPEAT ,
    • DELETE ,
    • DELETE_ALL , ,
  7. , DELETE (DELETE_ALL) DeleteRequest () - RequestsQueue.


, DeleteRequest - RequestsQueue.

, . , , . . , .

- , (txn.origin) , .

Requests Queue



AddRequest :
  • (bytes32)

DeleteRequest :
  • (bytes32)
CheckRequest :
  • (bytes32)

GetRequest .
:
  • (bytes32[])

AddBank :
  • (address)

CheckBank :
  • (address)





GetExternalRequest :
  • (bytes32)
    ( bytes32[]):
  • ( )
  • ( )

SetExternalResponse :
  • (bytes32)
  • (bytes32)
  • ( bytes32)
CheckExternalResponse :
  • (bytes32)
  • (bytes32)

:
  • :
  • FAIL
  • DELETE ,
  • DELETE_ALL ,
  • REPEAT ,




.
( OVERDUE) (DADATA_EXISTS_WAIT).
, , .


bytes32 Status ;
bytes32 ExpireDate ;
bytes32 OrgName ;
address Queue ;
bytes32[] Request_1 ;
bytes32[] Request_2 ;
bytes32 Request_id_1 ;
bytes32 Request_id_2 ;
bytes32 Response_id_1 ;
bytes32 Response_id_2 ;



function SomeContract(..., bytes32[] logics)
{
Owner =msg.sender ;
ExpireDate=logics[0] ;
OrgName =logics[1] ;
Status ="New" ;
Queue =0xd9b076d0b559f70782f379582bd3d54b85fc42cb ;
Request_1.length= 3 ;
Request_1[0] ="DAILY 00:10" ;
Request_1[1] ="OVERDUE" ;
Request_1[2] = ExpireDate ;
Request_2.length= 3 ;
Request_2[0] ="PERIOD 10" ;
Request_2[1] ="DADATA_EXISTS_WAIT" ;
Request_2[2] = OrgName ;
}

( )


function SetStatus(bytes32 status_, ...)
{
address self_addr ;
Status=status_ ;
if(status_=="Released_") {
self_addr=this ;
Request_id_1=bytes32(bytes20(self_addr)) | "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001" ;
Request_id_2=bytes32(bytes20(self_addr)) | "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002" ;
Queue.call.gas(0x30000).value(0)(bytes4(sha3("AddRequest(bytes32)")), Request_id_1) ;
Queue.call.gas(0x30000).value(0)(bytes4(sha3("AddRequest(bytes32)")), Request_id_2) ;
}
}


function GetExternalRequest(bytes32 request_id_) constant returns (bytes32[] retVal)
{
if(request_id_==Request_id_1) return(Request_1) ;
if(request_id_==Request_id_2) return(Request_2) ;
}



function SetExternalResponse(bytes32 response_id_, bytes32 request_id_, bytes32[] response_)
{
if(tx.origin!=Owner) return ;
if(Status!="Released_") return ;
if(request_id_==Request_id_1) {
Response_id_1=response_id_ ;
Status ="Overdue__" ;
}
if(request_id_==Request_id_2) {
Response_id_2=response_id_ ;
Status ="ToBank___" ;
}
}




Ethereum Rinkeby :
  • ( )


Rinkeby 79548a65e3ce179ec8d208c22ee84435dc34058f YYYY/MM/DD.

:

contract Check_request
{
Calendar Oracle ; // -
bytes32 Date ;
function Check_request()
{
// -
Oracle=Calendar(0x79548a65e3ce179ec8d208c22ee84435dc34058f) ;
//
Date=Oracle.GetDate() ;
}
}

//
//
//
contract Calendar
{
function GetDate() constant returns (bytes32 retVal) ;
}



- Rinkeby d9b076d0b559f70782f379582bd3d54b85fc42cb.

.
:

( ) Ethereum, .
0.1 Ether ( , ) . Rinkeby faucet, - PoA.


Ethereum


- -, (, - - , - ). , -, () .

Ethereum Solidity


, , , .

Ethereum Swarm


, Ethereum, Swarm ( ) . , - .

Swarm Windows . linux OSX, .

Storj.io


, API. API, Ethereum Swarm , .

. , , . , , , , .


- , .

, , , ( ) .

-, , , .

-, : (transaction fee). , - .

-, .

, : , .. - - .

, . , , .

, . , , .

Stay tuned!
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/332756/

:  

: [1] []
 

:
: 

: ( )

:

  URL