Unit ID
qkeof62i7UYm0Iy61No7I1WXd9LS9QTlaisuzZuJLUE=
Received
25.09.2019 11:27:23
Confirmation delay (full node)
6 minutes 53 seconds
Confirmation delay (light node)
9 minutes 48 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $processor = "me" ; // Obot by [email protected] // Get paid for doing computation on your computer, think Lambda for Obyte // The perfect function is one that takes little input data or a link to a big data set, then do complex or private computation // the processor runs headless wallet which listens for jobs from this AA // usage: // 1) function caller calls this AA with { "function" : "<function name>" , "args" : '<value or json>' } and processing fee // 2) processor computes and send to this AA { "job" : <job number> , "result" : <index> } // 3) the result gets sent back to caller and processor gets the processing fee // 4) result verification is up to the function caller, perhaps using simple technique like compare results from multiple Obots // setup: // set $processor to address which can add new function and take payment out // processor then need to have a Obot headless wallet listening to this AA's response // processor add function with { "function" : "<function name>" , "price" : 100,000 } $function = trigger.data.function ; }", "messages": { "cases": [ { "if": "{ trigger.address == $processor AND $function AND trigger.data.price }", "messages": [ { "app": "state", "state": "{ // ADD FUNCTION if( trigger.data.function >= 0 ) bounce( "function cannot be positive integer, because job are stored as positive integer" ) ; var[ trigger.data.function ] = trigger.data.price ; }" } ] }, { "if": "{ var[ $function ] AND trigger.output[[asset=base]] >= var[ $function ] }", "messages": [ { "app": "state", "state": "{ // START JOB var[ "job" ] += 1 ; var[ var[ "job" ] ] = trigger.address ; // store caller to receive result later // send job to listening Obot headless wallet response[ "job" ] = var[ "job" ] ; response[ "function" ] = $function ; response[ "args" ] = trigger.data.args otherwise false ; }" } ] } ] } } ]
Technical information
Fees:
2,484 bytes
(353 headers, 2131 payload)
Level:1077168
Witnessed level:1077161
Main chain index:1075931
Latest included mc index:1075930
Status:stable/confirmed/final