Pages:
Author

Topic: Understanding the Automated Transaction system (AT) - page 2. (Read 5302 times)

legendary
Activity: 2856
Merit: 1520
Bitcoin Legal Tender Countries: 2 of 206
an attack to recurrence ability because resources are not infinite.

Try creating an "infinite loop" AT - I'll even give you the machine code for that here:

Code:
1A000000

Now see what damage you can do with it. Smiley

(hint - you can't do any more damage with that than any other sort of DoS type of attack on the network)


ok, will try it! thank you!  Wink
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
an attack to recurrence ability because resources are not infinite.

Try creating an "infinite loop" AT - I'll even give you the machine code for that here:

Code:
1A000000

Now see what damage you can do with it. Smiley

(hint - you can't do any more damage with that than any other sort of DoS type of attack on the network as ATs work like "transactions" with funds needed to run them and fixed limits as to how many steps can be run per block)
legendary
Activity: 2856
Merit: 1520
Bitcoin Legal Tender Countries: 2 of 206
thank you! I want to know about how secure is such a decentralized turing complete system in the wild.

It is running now on Burst and we have so far seen no problems. What issues in particular are of concern?


an attack to recurrence ability because resources are not infinite.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
thank you! I want to know about how secure is such a decentralized turing complete system in the wild.

It is running now on Burst and we have so far seen no problems. What issues in particular are of concern?
legendary
Activity: 2856
Merit: 1520
Bitcoin Legal Tender Countries: 2 of 206
thank you! I want to know about how secure is such a decentralized turing complete system in the wild.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
is this turing complete and comparable to ethereum.org?

Yes AT is Turing complete and is already live on Burst (the first "mainnet" to be able to offer Smart Contracts which has been made possible through its use of AT).

It is expected that AT will be included in Qora soon and that then the world's first "atomic cross-chain transfer" between two different blockchains will be able to take place (using the ACCT AT we have already written).

This should be the basis for a completely decentralised exchange for cryptos (i.e. no trusted parties or servers). Understand that this only applies for trading cryptos for cryptos (not fiat).
legendary
Activity: 2856
Merit: 1520
Bitcoin Legal Tender Countries: 2 of 206
is this turing complete and comparable to ethereum.org?
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
In regards to the UI for AT we are currently creating a new design that should mean that .html files won't need to be installed manually (the UI will be able to be automatically generated according to metadata stored in the AT creation tx).
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
I noticed the start of "sig campaign" posts so I have deleted a few posts.

If you have a sponsored sig then don't bother posting here (without posting something of actual relevance) as I will delete your post (unlike the mods I don't care for that shit).
full member
Activity: 126
Merit: 100
Also, I have upload a new html version for the Lottery cases where the ATs are filtered properly and you only see the Lottery cases:

https://mega.co.nz/#!ycpXCADa!BWzhEmkm0JzfWn2HZL7YTat4hg0Jwuz5gD34TJ9SmSY

hi vbcs...
page downloaded and tested..
i have a request...

it is possible to add a column like this:
CountDown

simply put a timer indicating how far it is the conclusion of the current round in DAYS-HH-MM-SS

I do not know if it is feasible but it would be helpful!

thanx again!

We could put normal timestamps, but they would be estimations. For example the average block time in burst is around 4 minutes. So when the page says ends in 5000 blocks that's about 1250min almost one day, but that figure is just an estimation based on the average block time.

i get it
you are right..
if so... we can just add 2 simplest colums:

1) BlockRemaining --> NexDrawBlockNumber - CurrentBlockNumber
2) EstimatedTimeForNextDraw --> BlockRemaining * 4, writing note like "this is the estimated until next draw"

if you want to enance the time forecasting, you can use a linear regression of the last 50 or 100 block time...
or if you have not the possibility to use regLnr, you can use a simples moving average...

i do not know assembly...

so, i cannot implement it...

hope a framework who can handle programming in C, C# come out soon!

in any case
thanks for everything
full member
Activity: 137
Merit: 100
AT - Automated Transactions - CIYAM Developer
Also, I have upload a new html version for the Lottery cases where the ATs are filtered properly and you only see the Lottery cases:

https://mega.co.nz/#!ycpXCADa!BWzhEmkm0JzfWn2HZL7YTat4hg0Jwuz5gD34TJ9SmSY

hi vbcs...
page downloaded and tested..
i have a request...

it is possible to add a column like this:
CountDown

simply put a timer indicating how far it is the conclusion of the current round in DAYS-HH-MM-SS

I do not know if it is feasible but it would be helpful!

thanx again!

We could put normal timestamps, but they would be estimations. For example the average block time in burst is around 4 minutes. So when the page says ends in 5000 blocks that's about 1250min almost one day, but that figure is just an estimation based on the average block time.
full member
Activity: 126
Merit: 100
Also, I have upload a new html version for the Lottery cases where the ATs are filtered properly and you only see the Lottery cases:

https://mega.co.nz/#!ycpXCADa!BWzhEmkm0JzfWn2HZL7YTat4hg0Jwuz5gD34TJ9SmSY

hi vbcs...
page downloaded and tested..
i have a request...

it is possible to add a column like this:
CountDown

simply put a timer indicating how far it is the conclusion of the current round in DAYS-HH-MM-SS

I do not know if it is feasible but it would be helpful!

thanx again!
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Fundamentally both AT and Ethereum solve the problem of providing "Turing complete" smart contracts but they do this in quite different ways.

Ethereum have used a Java like VM whilst AT is "virtual CPU". To most users of this technology the underlying mechanism is not going to matter and whether one approach or the other is better remains to be seen.

AT does not include a "new high-level language" (which Ethereum does) so the path towards a HLL for AT would actually be to harness an existing (and extremely well tested) system such as LLVM by targeting AT as a new kind of CPU that it can work with.

Assuming we are able to get LLVM working with AT then you would be able to program ATs using C/C++ (and other "industry standard" languages).
member
Activity: 66
Merit: 10
Thanks for creating this, it is really good!

Do you know how is this different from the Ethereum scripting system, firstly, is it conceptually the same thing or the purpose of Ethereum's scripting engine is something different?
legendary
Activity: 1932
Merit: 1042
https://locktrip.com/?refId=40964
sr. member
Activity: 280
Merit: 250
I'd like to give/explain another AT example.

This is AT code for 'fund management'. The AT will store coins, and have 5 authorized users. If 3 of the 5 users send it the same message containing a destination address and an amount, the AT will make a transaction of that amount to that address. If no funds are transfered out for a set amount of time, the AT can be sent a message and the AT will assume it became inaccessable(lost keys, etc), and transfer it's funds to a set address.

Code:
FUN @txIterTime get_Block_Timestamp
^declare scratch
^declare counter

at the top we store the current time for use when iterating transactions.
declare can be used to force variable in specific positions, which can be useful to force variables to the begining if you want to pass initial data on at creation to have them initialized before the AT starts, but we don't do that here, so it's only for demo puposes

SET @numUsers #0000000000000005
SET @neededVotes #0000000000000003
SET @dormantTransferAddress #0000000000000000
SET @dormantTransferMinutes #0000000000000028

we set up some constants used, num users, num votes needed, address to tranfer for inactivity, and minutes of inactivity until transfer(should be much higher, but had it low for testing)

SET @dormantDeadline $txIterTime
FUN @dormantDeadline add_Minutes_to_Timestamp $dormantDeadline $dormantTransferMinutes

we set a deadline for when we'll transfer to fallback if no transfers out occur

^allocate allowedUsers 5
^allocate votesAccount 5
^allocate votesAmount 5

allocate sets aside the specified number of spaces and also adds a SET command setting the variable name specified to the starting address of the block so it can be used as a pointer to an array

^comment set user ids in scratch assignments
CLR @counter
SET @scratch #a9d3c7e1052e59b6
SET @($allowedUsers + $counter) $scratch
INC @counter
SET @scratch #d588a72e511f576a
SET @($allowedUsers + $counter) $scratch
INC @counter
SET @scratch #878344bc465ee397
SET @($allowedUsers + $counter) $scratch
INC @counter
SET @scratch #5b4a79c0ad8542ea
SET @($allowedUsers + $counter) $scratch
INC @counter
SET @scratch #fca2612346d6d33b
SET @($allowedUsers + $counter) $scratch
^comment end user id assignments

here we just hardcoded some user ids. for demo purposes these are the id numbers for burst accounts with passphrases a, as, asd, asdf, and asdfg.

ERR :dormantTransfer

we set an error handler. if for some reason the at get stuck and is unable to continue(trying to access address out of address space, divide by 0, etc), it will jump there instead of dieing. The risk of something like that happening here is low due to the simplicity of this at, but it's always a good idea to have a handler dumping the coins somewhere, otherwise they'll all end up in transaction fees going to the miners if you did make a mistake somewhere

PCS

pcs sets a new start point. the AT will resume from here instead of the top when we do finish calls, skipping over the initialization.

txloop:
FUN A_to_Tx_after_Timestamp $txIterTime
FUN @scratch check_A_Is_Zero
FIZ $scratch
FUN @txIterTime get_Timestamp_for_Tx_in_A
FUN @scratch get_Type_for_Tx_in_A
BZR $scratch :txloop

here we have a loop that tries to get the next transaction. an id of 0 is returned if there is none, so we finish if none was retrieved(FIZ = finish if zero). if we did get a tx id, we store the timestamp to use for the next tx retrieval attempt, and then check what type of tx we have. a normal payment is 0, but if there is a message attached it is a type 1. we ignore normal payments transfering funds in, but continue on processing if there is a message

CLR @counter
FUN B_to_Address_of_Tx_in_A
FUN @address get_B1
findUserLoop:
SET @scratch $($allowedUsers + $counter)
BEQ $address $scratch :foundUser
INC @counter
BLT $counter $numUsers :findUserLoop

here we check to see if the user is on the authorized list. we retrieve the address who sent us the tx, and loop through authorized users, and jump to :founduser if we found them in the list

^comment check dormant time
BLE $txIterTime $dormantDeadline :notFoundUser
JMP :dormantTransfer
notFoundUser:
JMP :txloop

if the user wasn't found, we check the timestamp against the inactivity timestamp. due to a limit on the distance a branch op can jump and limitations of the currently available assembler, a workaround needed to be used here of branching over a jmp. the most recent but not yet publically available version can automatically convert too far branches to branch jmp combinations, so this is a temporary issue
if the inactivity deadline is up, we jump to :dormanttransfer, and if not we return to the tx loop.

foundUser:
SET @userIndex $counter
FUN message_from_Tx_in_A_to_B
FUN @address get_B1
FUN @amount get_B2
SET @($votesAccount + $userIndex) $address
SET @($votesAmount + $userIndex) $amount

if the user was found in the authorized list, we save the counter from the loop to use as the array index for that user's state. We get their message and save the intended destination and amount as that user's current vote

CLR @voteCount
CLR @counter
countVotesLoop:
SET @scratch $($votesAccount + $counter)
BNE $scratch $address :notSameVote
SET @scratch $($votesAmount + $counter)
BNE $scratch $amount :notSameVote
INC @voteCount
notSameVote:
INC @counter
BLT $counter $numUsers :countVotesLoop
BGE $voteCount $neededVotes :votePassed
JMP :txloop

now we loop through all the votes, and count up the amount which are identical to the one we just recorded. If the amoount is at least the threshold specified in the constants at the top, we jump to :votePassed, otherwise we head back to the tx loop

votePassed:
FUN clear_B
FUN set_B1 $address
FUN send_to_Address_in_B $amount

when the vote is passed, we send that amount

CLR @counter
CLR @scratch
clearLoop:
SET @($votesAccount + $counter) $scratch
SET @($votesAmount + $counter) $scratch
INC @counter
BLT $counter $numUsers :clearLoop

we clear out all the votes after a send

^comment update dormant transfer deadline
SET @dormantDeadline $txIterTime
FUN @dormantDeadline add_Minutes_to_Timestamp $dormantDeadline $dormantTransferMinutes
JMP :txloop

then we set a new inactivity deadline, and head back to the tx loop

dormantTransfer:
FUN clear_B
FUN set_B1 $dormantTransferAddress
PCS
sendAll:
FUN send_All_to_Address_in_B
JMP :sendAll

if the inactivity deadline runs out a jump from above can take us here, and this is also the error handler. we set the fallback address as destination, and put ourselves in an infinite loop sending there. the script will halt due to lack of funds immediatly after the send, so it will only get activated when it receives more, which it will then proceed to send, then halt
full member
Activity: 126
Merit: 100
Also, I have upload a new html version for the Lottery cases where the ATs are filtered properly and you only see the Lottery cases:

https://mega.co.nz/#!ycpXCADa!BWzhEmkm0JzfWn2HZL7YTat4hg0Jwuz5gD34TJ9SmSY

i'm really interested vbcs!!!
when i come back home i give it a try for sure!!!!

 Wink
full member
Activity: 137
Merit: 100
AT - Automated Transactions - CIYAM Developer
Also, I have upload a new html version for the Lottery cases where the ATs are filtered properly and you only see the Lottery cases:

https://mega.co.nz/#!ycpXCADa!BWzhEmkm0JzfWn2HZL7YTat4hg0Jwuz5gD34TJ9SmSY
full member
Activity: 137
Merit: 100
AT - Automated Transactions - CIYAM Developer
legendary
Activity: 1932
Merit: 1042
https://locktrip.com/?refId=40964
Pages:
Jump to: