Bitcoin Forum
May 31, 2024, 01:43:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 [3] 4 5 6 7 »
41  Alternate cryptocurrencies / Altcoin Discussion / Re: Understanding the Automated Transaction system (AT) on: February 09, 2015, 07:46:26 PM
To design an AT properly you need some insight knowledge of how AT is designed to work. I will try to give some hints providing an example for the Lottery case that is currently running on burst platform under the name LuckyAT. The post is rather big and I hope is simple enough to understand.

First of all you need to be aware that each AT is actually an account ( with an address without public key and only the AT can access that account's funds ). The way to "communicate" with the AT is through txs. Sending funds to the AT is achieved with a normal tx.

When the Lottery case is deployed for the first time all the variables are initialized to 0. When the lottery starts for the first time you need to initialize some of the variable properly.

( The full code of the Lottery case can be found here: http://pastebin.com/xiDdMzEG

In the Lottery case the following first lines do that:
Code:
BNZ $payout_time :loop
SET @min_amount #00000005efeb1f00
FUN @payout_time get_Creation_Timestamp
SET @timestamp $payout_time
init:
SET @payout_balance #0000000000000000
SET @tx_info #0000000000002760
FUN @payout_time add_Minutes_to_Timestamp $payout_time $tx_info

The first line does a sanity check to see if the variable payout_time is initialized. If it is not, we are setting the variable min_amount (which is the ticket size to participate to the Lottery) and then we set payout_time to the creation timestamp (which is the "timestamp" of the block the Lottery has been deployed).

NOTE: An important concept in ATs are the "timestamps". Timestamps are constructed using the block height and the order of the tx inside the block. If you want for example to fetch the 3rd tx at block height 15885 then the corresponding timestamp will be (15885)(3). The best way to think timestamps is the combination of two integers, one for the block height and one for the tx. The Creation timestamp always uses 0 for the second part f.e (blockHeight)(0).

As stated also in www.ciyam.org/at/at_api.html : "timestamp" does not mean a real timestamp but instead is an artificial timestamp that includes two parts. The first part is a block height (32 bits) with the second part being the number of the transaction if applicable (also 32 bits and zero if not applicable).

The third line is copying payout_time to timestamp.

The 5th line is "labelling" the following code as a branch point where you can "jump" later if needed.
The 6th and 7th lines are initializing payout_balance ( which is the total amount the lottery gathered as winnings for the winner) and tx_info respectively. Tx_info will be used as input to the API call add_Minutes_to_Timestamp along with payout_time and what actually this line does is:
payout_time = payout_time + tx_info
This way the lottery is aware after which block can send the prize to the winner and restart.

The next lines are the following:
Code:
loop:
FUN A_to_Tx_after_Timestamp $timestamp
FUN @tx_info check_A_Is_Zero
BNZ $tx_info :process_tx
FIN

Here the lottery fetches the first tx (if any) after the provided timestamp. If there is a tx ( FUN @tx_info check_A_Is_Zero ) then we proceed processing the tx else the AT stops and sets the program counter (pc) to pcs (FIN op code) ( pcs is zero at that point ) .
Setting the pc to 0 makes the AT to start from the first line ( BNZ $payout_time :loop ) the next time it will run.
Also stopping the AT using the FIN op code will "freeze" the AT until the ATs account balance changes ( f.e. until someone sends funds to the AT ). If you don’t want at this point to freeze the AT, you could change the FIN with SLP op code which will make the AT to "sleep" for just one block. ( That does not mean always that the AT will run on next block, as the block might be full with other ATs which have higher priority to run ).

If there is a tx then the Lottery continues with:
Code:
process_tx:
FUN @tx_time get_Timestamp_for_Tx_in_A
BLT $tx_time $payout_time :get_info_amount
JMP :payout

Here we get the timestamp of the tx and we check if that timestamp is less than the payout_time timestamp. If it is, we proceed fetching more info for that tx ( :get_info_amount ) else is time to pay the winner the total amount gathered ( JMP :payout ).

Code:
get_info_amount:
FUN @tx_amount get_Amount_for_Tx_in_A
FUN B_to_Address_of_Tx_in_A
FUN @tx_info get_B1
FUN B_to_Address_of_Creator
FUN @creator get_B1
BEQ $creator $tx_info :bootstrap
FUN @tx_info get_Type_for_Tx_in_A
BNZ $tx_info :skip
BEQ $tx_amount $min_amount :get_ticket
JMP :refund

Note: The Lucky AT has been programmed to not draw a ticket for funds received from the Creator's Address. This way the creator can send funds to the AT to increase the prize without participating in the draw.

The above piece of code fetches the amount of the tx, the address of the sender and the address of the creator. If these two addresses are equal we jump to :bootstrap (see above note), else we fetch the type of the tx ( 0-> normal tx, 1-> message tx). If the tx is not a message tx, we check if the amount of the tx is equal to the ticket amount. If it is we proceed drawing a ticket for that tx else we proceed on refunding that tx.

Note about the amounts: When you create an AT you set a field called minimum activation account. That amount is the minimum account required to process the tx. All the API calls that return amounts are deducting that minimum activation account ( f.e if minActivationAmount is set to 10 coins and you send a tx of 250 coins, the amount the AT will see is 240).

 Moving forward we see:
 
Code:
 get_ticket:
FUN @tx_info get_Ticket_Id_for_Tx_in_A
FIZ $tx_info
FUN B_to_Address_of_Tx_in_A
FUN set_A1 $tx_info
FUN send_A_to_Address_in_B
ADD @payout_balance $min_amount
BLE $tx_info $best_ticket :skip
SET @best_ticket $tx_info
FUN @best_account get_B1

Here we draw a ticket for that tx and if the ticket is not zero we send a message with the ticket value to the sender of the tx. After that we add the amount of the tx to the payout_balance and we check if the ticket we have draw is greater than the current best_ticket. (Note: The highest ticket wins). If the ticket we have picked is greater, we store the ticket value to best_ticket and the senders account to best_account, else we jump to skip.

Note: the API call get_Ticket_Id_for_Tx_in_A is making the AT to freeze at that point until the ticket is "ready" assuring the ticket is random ( a ticket is ready after 15 blocks from the block the tx belongs, f.e. if you make a tx at block height 14500 then the ticket will be ready at block 14515 and the AT freezes until then).

Code:
skip:
SET @timestamp $tx_time
JMP :loop

Here we set the timestamp to the tx's timestamp we just processed and jump to loop where we continue fetching txs after that timestamp.

Code:
bootstrap:
ADD @payout_balance $tx_amount
JMP :skip

Here we increase the prize ( payout_balance ) when the creator sends funds to the Lottery.

Code:
payout:
BZR $payout_balance :empty
BZR $best_ticket :empty
FUN set_B1 $best_account
FUN @block_timestamp get_Block_Timestamp
BEQ $block_timestamp $payout_time :pay_all_at_amount
FUN send_to_Address_in_B $payout_balance
JMP :finish_payout
pay_all_at_amount:
FUN send_All_to_Address_in_B
JMP :finish_payout

The above code checks that we have a winner and if we have a winner we pay him either the total ATs account or the payout_balance.

NOTE: Sometimes the AT might have more or less amount than the one it has gathered from tickets. When the ATs amount is greater it means that the processing fees were less than the "minimum activation amount's" gathered from tx's. If the ATs amount is less then the "min activation amount" was set "wrongly" and the processing of the tx's are more costly. Sometimes is difficult or impossible to have a constant min activation amount (f.e if a transaction is greater than the amount needed to participate, the tx will be refunded, thus it will consume more fees. If the tx is equal to the ticket amount then there are no fees for refunding that tx ).

Code:
empty:
SET @timestamp $tx_time
JMP :init

If there is no winner on the previous round ( none txs were sent to the Lottery) then we proceed with initialization of the variables.

Code:
refund:
FUN B_to_Address_of_Tx_in_A
BLE $tx_amount $min_amount :refund_less
SUB @tx_amount $min_amount
FUN send_to_Address_in_B $tx_amount
JMP :get_ticket
refund_less:
FUN send_to_Address_in_B $tx_amount
JMP :skip

Here the refunding takes place. There are 2 possibilities. Either the amount of the tx is greater than the ticket amount or less. If the txs amount is greater then we refund the difference ( tx_amount - min_amount) and then we draw a ticket for that tx, or we refund the total amount of the tx.

Code:
finish_payout:
SET @timestamp $payout_time
SET @best_ticket #0000000000000000
SET @best_account #0000000000000000
JMP :init

After paying the winner we set the timestamp to payout_time and we initialize best_ticket and best_account to 0 and we continue by jumping back to init.

42  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.2 Automated Transactions on: February 09, 2015, 02:31:15 PM
Hey,

The Crowdfund case is here and ready to be used to fund your projects and ideas. The rules are simple.
You define a name, a description, the total duration of the crowdfunding and the total amount you need to gather. After the duration you have set, the AT checks the total amount gathered and if is greater than the one you have asked, the total amount is sent back to the ATs creators account. If the project is not successfully funded then refunds all the participants the amount they have sent minus the fees the AT needs for processing ( approx. 7 bursts ).

After the crowdfund case is done, the AT acts as a donation address, where any amount sent to the AT goes to the creator of the AT.

As in the lottery case I created a html file for making things easier for anyone interested in creating his project or help funding the project. If you want to use the html file then copy it under html/ui/ directory.
The resulting html looks like that:


You can find the corresponding html here: http://burstcoin.info/d/cf
and the assembly code of the CF case here: http://pastebin.com/09j994Yc
I tried to create a Crowdfund AT, but it gives an error:



The name should not contain spaces Smiley
I tried it again without spaces - same error. Are there other limitations? Do I need anything else except 1.2.2 wallet and atcrowdfund.html? What is the fee needed - there are just 2 burst there (BURST-RUL4-HV8X-C2US-79AAU)?

There is a limitation on the total size the name can be, but i dont recall atm the exact number (maybe 30 chars). Maybe that is th reason you are getting rejection. Can you try with a shorter name instead?
43  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.2 Automated Transactions on: February 09, 2015, 11:51:32 AM
Hey,

The Crowdfund case is here and ready to be used to fund your projects and ideas. The rules are simple.
You define a name, a description, the total duration of the crowdfunding and the total amount you need to gather. After the duration you have set, the AT checks the total amount gathered and if is greater than the one you have asked, the total amount is sent back to the ATs creators account. If the project is not successfully funded then refunds all the participants the amount they have sent minus the fees the AT needs for processing ( approx. 7 bursts ).

After the crowdfund case is done, the AT acts as a donation address, where any amount sent to the AT goes to the creator of the AT.

As in the lottery case I created a html file for making things easier for anyone interested in creating his project or help funding the project. If you want to use the html file then copy it under html/ui/ directory.
The resulting html looks like that:


You can find the corresponding html here: http://burstcoin.info/d/cf
and the assembly code of the CF case here: http://pastebin.com/09j994Yc

I found a bug. The wallet mixes up the lotteries and the crowdfunds. On one pc I can see the lotteries and the crowdfunds in the atcrowdfund.html and on the other computer I see both lotteries and crowdfunds in the atlotteries.html.

I am aware of tha bug. When I made the lottery html I forgot to filter the ATs based on the name or description. We have discuss it with burstdev and we said we need to put one more field (tags) when creating the AT. This way the filtering of the ATs will be easier
44  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.2 Automated Transactions on: February 08, 2015, 10:11:30 PM
Wonderful, now it works  Grin

It would be nice to write hints like "no spaces" and how long it will take to see the Crowdfunding Project Active. That would help Smiley

I love this coin

Websites are not really my thing, but any recommendation is welcome )). A crowdfund project to be active and to start showing the info properly needs at least one transaction (of at least 2 bursts)
45  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.2 Automated Transactions on: February 08, 2015, 09:57:39 PM
Hey,

The Crowdfund case is here and ready to be used to fund your projects and ideas. The rules are simple.
You define a name, a description, the total duration of the crowdfunding and the total amount you need to gather. After the duration you have set, the AT checks the total amount gathered and if is greater than the one you have asked, the total amount is sent back to the ATs creators account. If the project is not successfully funded then refunds all the participants the amount they have sent minus the fees the AT needs for processing ( approx. 7 bursts ).

After the crowdfund case is done, the AT acts as a donation address, where any amount sent to the AT goes to the creator of the AT.

As in the lottery case I created a html file for making things easier for anyone interested in creating his project or help funding the project. If you want to use the html file then copy it under html/ui/ directory.
The resulting html looks like that:


You can find the corresponding html here: http://burstcoin.info/d/cf
and the assembly code of the CF case here: http://pastebin.com/09j994Yc
I tried to create a Crowdfund AT, but it gives an error:



The name should not contain spaces Smiley
46  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.2 Automated Transactions on: February 08, 2015, 06:47:44 PM
Hey,

The Crowdfund case is here and ready to be used to fund your projects and ideas. The rules are simple.
You define a name, a description, the total duration of the crowdfunding and the total amount you need to gather. After the duration you have set, the AT checks the total amount gathered and if is greater than the one you have asked, the total amount is sent back to the ATs creators account. If the project is not successfully funded then refunds all the participants the amount they have sent minus the fees the AT needs for processing ( approx. 7 bursts ).

After the crowdfund case is done, the AT acts as a donation address, where any amount sent to the AT goes to the creator of the AT.

As in the lottery case I created a html file for making things easier for anyone interested in creating his project or help funding the project. If you want to use the html file then copy it under html/ui/ directory.
The resulting html looks like that:


You can find the corresponding html here: http://burstcoin.info/d/cf
and the assembly code of the CF case here: http://pastebin.com/09j994Yc
47  Alternate cryptocurrencies / Altcoin Discussion / Re: AT vs. Ethereum - what direction are we headed in? on: January 29, 2015, 07:02:28 PM
If you think the purpose of what we are trying to achieve here ( not specifically us - the AT team ) but in general, then the key word is decentralization. Decentralization does not mean one chain or one platform rules them all, that is not decentralization. The competition is a good thing as it pushes the creativity upwards. There are a lot of developers ( and not only devs ) that have spend hours working on their coins and all we want is to give them a chance to be updated with the latest technological achievements and that is the reason we created AT.
48  Alternate cryptocurrencies / Altcoin Discussion / Re: AT vs. Ethereum - what direction are we headed in? on: January 29, 2015, 06:46:18 PM

Ethereum is much more than just simple smart contracts.
I think you are doing better not to compare your project with them everytime.

But I have a question. Besides Burst, are there other coins interested in implementing your AT? Some serious projects like NXT, etc. etc.?



ATs are also much more. It might be the "engine" that provides smart contract functionality, but also can close the gap between these different platforms, giving them a way to communicate through ATs. It can be the link of a larger cryptosystem with multiple different platforms in it. 
49  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 29, 2015, 03:33:58 PM
I seem to be having an issue with the lotteries, when I go to http://localhost:8125/atlotteries.html it gives me file missing error, but the file is clearly there. What is it that I'm not doing correctly Huh

Is the .hrml located under html/ui ?? Also are you using localhost or 127.0.0.1 to browse the burst wallet? If you are using 127.0.0.1 you probably need to download the other version.
50  Alternate cryptocurrencies / Altcoin Discussion / Re: AT vs. Ethereum - what direction are we headed in? on: January 28, 2015, 06:54:29 PM
Yes link is up and running again.

Here you can see the main specs: http://www.ciyam.org/at/at.html

and the API calls here: http://www.ciyam.org/at/at_api.html

You will also notice some tests. These tests are using the older version of the AT as well as some of the use cases are using the old API and they will be updated soon.

Also there is a link to the .cpp prototype. http://www.ciyam.org/at/_at.cpp.html

We will be glad to answer any questions regarding the provided informations.
51  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 28, 2015, 08:00:54 AM
Curious, is the lottery 100% payout? Something like that could actually be used to drive up the price of burst, say if it destroyed 10% of the pot each time... That's just one idea, but there are a lot of ways you could use that to increase the value of Burst inherently from inside the coin.

The ticket size is 2015 burst. The processing fees the Lottery needs to run, every time, averages at 15 bursts approx. These fees goes to the miners. So the actual ticket size is 2000 that is taken into account when AT Lottery makes the payment. If you want to burn a portion it is possible to create an AT that foes nothing, and every amount sent to it is useless. Also cant you just burn burst by sending them to the genesis account? Why to use the Lottery case for that?
52  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 28, 2015, 06:32:15 AM
i just bought a lottery ticket. hope that i be the lucky one.  Grin

äh i´m a little confused. do i enter in the amount field for the lottery 1 for 1 ticket oder 2015 for 1 ticket?

I just tried with 1 and i send 1 burst. i think thats wrong?!

Can some explain and can someone clear this point in the manuel for the lottery?



The amounts are in NQT so to send 2015 bursts =201500000000 NQT
53  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 27, 2015, 10:38:00 PM
(edit)

running the 1.2.1 precompiled jar gives me other results than running my compiled version of 1.2.1, using my fork at github, which *should*'ve been updated with the 1.2.1 on the burst github.

I will compare sources and trace back and see what's the cause, either i merged in something in a bad way, or i didn't pull stuff out correctly, or the compile process itself was wrong somehow, or perhaps the jar in the 1.2.1 archive has not been built with the exact 1.2.1 sources on github. Will go hunt for answes and be back once i know what i did wrong. Until further notice, you can assume i made an error somewhere.

my fork stumbles upon block 60414, while the burst.jar in the 1.2.1 distro has no issues with that block.


sorry for all the noise... just kinda confused, never had this kind of problem before.




Have you tried compiling the source code of the original 1.2.1 release burstdev uploaded here and compare the resulted jar with the one included in the release??
54  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 27, 2015, 04:07:17 PM
I'm seeing NXT log entries like this:
Code:
2015-01-27 14:41:42 INFO: tx with id 0 found
2015-01-27 14:41:42 INFO: Transaction to 4697159292272720752 amount 0

Plus I submitted a transaction to my wallet, called getUnconfirmedTransactionIds then getTransaction on that transaction only to be told:
Code:
{\"errorDescription\":\"Unknown transaction\",\"errorCode\":5}

Possible race condition in the wallet software?

These are AT txs, 4697159292272720752 is account number. When an AT program seeks for a tx after a timestamp and there is none you see that debug message. These outputs will be removed in next releases.
55  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Qora | 100% POS | Assets | Names | Voting | Open Source on: January 26, 2015, 06:47:27 PM
I don't know about the new wallet, but the AT is 95% done, some small additions and a lot of stress testing before going live.
56  Bitcoin / Bitcoin Discussion / Re: Why blockchains might want to consider using AT "Turing complete" txs on: January 26, 2015, 06:46:13 PM
Any word on Qora AT?

Qora AT is 95% done, some minor additions and a lot of stress tests yet to be done. 
57  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 26, 2015, 05:59:11 PM
What is the status with the fork? It is still on going?
I think it is mostly settled

Most major players updated today, if they haven't done so before

In my local wallet i see that for last block

60148   26/01/2015 19:57:40   21'883.16202858 + 58   58

is it correct?
58  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 26, 2015, 05:08:20 PM
What is the status with the fork? It is still on going?
59  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 26, 2015, 06:49:47 AM
also have errors in java console

INFO: tx id with id 0 found
Transaction to <long number> found amount 0
get timestamp for tx id - <big number> found

This is not an error, these messages are debug messages for the AT, they will be removed in next release
60  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BURST] Burst | Efficient HDD Mining | New 1.2.1 Automated Transactions on: January 26, 2015, 05:46:36 AM
I'm at 59830...

I don't see the AT Lotteries in the .html. There is no lottery to pick. Do I have to put an account id of the lottery-wallet?

Maybe you have to redownload the html, as the ones i posted at the beginning were using testnet port instead of mainnet ports.
Here is the link to the post with the links:https://bitcointalk.org/index.php?topic=731923.msg10254497#msg10254497

That worked! Thanks alot vbcs...! Can't believe this just works fine. Can't wait for more implementations of AT.


Would be nice though to put a dot into the "Buy Ticket"-Price of 201500000000. Wink

Yes you are correct, amounts are in NQT, i could probably add a dot or comma there. But don't worry if you send an amount greater than the ticket cost the lottery will refund you the difference and still gives you a ticket. If you send to the lottery less than the ticket cost and the amount you sent is also greater than the processing fees of 15 burst coins still you will get a refund ( but no ticket ). Any amounts below 15 burst coins are ignored.
Pages: « 1 2 [3] 4 5 6 7 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!