Bitcoin Forum
June 17, 2024, 02:56:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 7 8 9 10 »  All
  Print  
Author Topic: Nxt :: Automated Transactions (AT) - progress and discussion  (Read 17237 times)
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 04:43:54 AM
 #21

but, what is a nxt scripts?

A simple example (in fact our first "use case") is a script (or perhaps more correctly termed a "program" as we are not actually going to be using a typical "script" language) that pays a dividend to the shareholders of an Asset.

So in pseudo code this might look something like the following:

Code:
var b = get_Balance( );
var n = get_Number_Of_Account_Users( );
if( n > 0 )
{
   var s = b / n;
   if( s > 0 )
   {
      while( true )
      {
         var a = get_Next_Account_User( );
         if( a == 0 )
            break;
         send_Amount_To_Account( s, a );
      }
   }
}

I hope that isn't too confusing.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 04:52:20 AM
 #22

also could you write a javascript implenentaion of nxt client....?

I think that I shouldn't have used the word "script" (anyone got a better name?).

Although we may well add some sort of "higher level" language later (which might look similar to some popular scripting languages) at this stage we are focused on something that will be much more primitive.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
dylan123
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
February 14, 2014, 04:56:09 AM
 #23

+1
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 04:57:16 AM
 #24

Do you mean to say that external calls to something like getLastBlock() will not block until return?

At this stage I would expect function calls "to block" although there may be some special cases for async execution but I think that such cases would be very few (if any at all) as we need to have a "deterministic" system.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
superresistant
Legendary
*
Offline Offline

Activity: 2142
Merit: 1130



View Profile
February 14, 2014, 08:46:52 AM
 #25

A simple example (in fact our first "use case") is a script (or perhaps more correctly termed a "program" as we are not actually going to be using a typical "script" language) that pays a dividend to the shareholders of an Asset.
So in pseudo code this might look something like the following:
Code:
(see above)
I hope that isn't too confusing.

I love it. This would be very useful.
Does Nxt Scripts use Nxt fees in order to be used ?
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 09:13:46 AM
 #26

Does Nxt Scripts use Nxt fees in order to be used ?

Indeed - basically a transaction to "execute" a script will be charged per "step" of execution (we can't tell how long a script will run as they will be "Turing complete"). If the payer hasn't provided enough fees then the script effectively "stops" at whatever step it is currently on (and can be resumed at a later point in time if a new fee paying tx asks it to).

There are also most likely going to be some basic limits as to the max. number of "steps" that a single forger would have to execute otherwise some paying an enormous fee to an "infinite loop" script could bring the network to a grinding halt.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
superresistant
Legendary
*
Offline Offline

Activity: 2142
Merit: 1130



View Profile
February 14, 2014, 09:55:45 AM
 #27

Does Nxt Scripts use Nxt fees in order to be used ?
Indeed - basically a transaction to "execute" a script will be charged per "step" of execution (we can't tell how long a script will run as they will be "Turing complete"). If the payer hasn't provided enough fees then the script effectively "stops" at whatever step it is currently on (and can be resumed at a later point in time if a new fee paying tx asks it to).
There are also most likely going to be some basic limits as to the max. number of "steps" that a single forger would have to execute otherwise some paying an enormous fee to an "infinite loop" script could bring the network to a grinding halt.

This could make Nxt forging very lucrative.
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 10:50:10 AM
 #28

This could make Nxt forging very lucrative.

Certainly the amount of fees cannot be too trivial or the burden on the network would be too great so I'd expect such "scripts" will have to be fairly generous in order to function reasonably.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
BaiMangal
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
February 14, 2014, 01:56:56 PM
 #29

I think that I shouldn't have used the word "script" (anyone got a better name?).

instructions
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 02:21:33 PM
 #30

instructions

Hmm... don't think the marketing team would be jumping up and down about that.

Perhaps something like "Smart Transactions" might be a little "more catchy" (although I am not a marketing guy).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 14, 2014, 02:28:39 PM
 #31

Scripting or Automation.
BaiMangal
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
February 14, 2014, 02:33:33 PM
 #32

aaa I didn't think we want it as a marketing sounding, I thought it was to be as close as possible to what you will be doing:)

for marketing: Adaptive Layer
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 02:45:14 PM
 #33

for marketing: Adaptive Layer

Now that does sound like something you'd hear from marketing. Grin

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Damelon
Legendary
*
Offline Offline

Activity: 1092
Merit: 1010



View Profile
February 14, 2014, 03:45:01 PM
 #34

for marketing: Adaptive Layer

Now that does sound like something you'd hear from marketing. Grin


If you like living on the edge these days: "Malleable Operations" Wink

Member of the Nxt Foundation | Donations: NXT-D6K7-MLY6-98FM-FLL5T
Join Nxt Slack! https://nxtchat.herokuapp.com/
Founder of Blockchain Workspace | Personal Site & Blog
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 04:38:40 PM
 #35

If you like living on the edge these days: "Malleable Operations" Wink

Indeed - btw - after some consideration the "use case" of the "dividend" doesn't actually seem to be a very good use case for scripting anyway (it could be done more efficiently with a special "pay to many" tx type).

So we are interested in some better use cases - a couple of ideas we have so far are:

1) A "lotto" in which the script contains the "hash" of a secret. People send funds to the script and then when the secret is revealed the funds are sent to the tx whose hash (or time stamp or combination) is closest.

2) A "dead man's switch" savings account that will send your funds to another account if you don't instruct it otherwise (say once per year).

Perhaps we could come up with something better than these as a more "compelling" use case to justify why we want to create such a script system?

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
BaiMangal
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
February 14, 2014, 04:55:15 PM
 #36

a use case script:
create an account by a number of people sending parts of the passphrase to account A (i.e. someone creates an account address and stores somehow that lets say 3 users will send parts of a passphrase for creating a new account)
after account A receives the expected parts of the passphrases (in this case 3) it creates a new account address B (based on the 3 passphrases in the example)
when users want to instruct account B to send NXT to another account they have to pass the 3 passphrases and same instruction in between the 3 of them, i.e. passphrase + Transfer 1000NXT to 43214321)

stupid? semi stupid?  Grin
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 05:07:22 PM
 #37

stupid? semi stupid?  Grin

Well the problem is that a script can't "hide" anything (I am aware of some of the amazing new crypto ideas thanks to James but as of now they are not practical - nor will they be in the foreseeable short term future) so I don't think this is something it could be used for.

Another idea that has been suggested is a form of "hedging" where you might bet that Asset A is going to be worth more than Asset B at a certain time (or vice-versa).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
BaiMangal
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
February 14, 2014, 06:05:29 PM
 #38

Didn't think about the fact that it cannt hide.

Can an account be setup to be able to send NXT only when it receives same message from a combination of other accounts (3 in my example)?
If that's possible then is it possible to create the account with random generation password that password is not saved in the blockchain?
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 14, 2014, 06:37:10 PM
 #39

Can an account be setup to be able to send NXT only when it receives same message from a combination of other accounts (3 in my example)?
If that's possible then is it possible to create the account with random generation password that password is not saved in the blockchain?

The "message" can only be another transaction - so I am not quite sure what you think can be achieved as any tx will be seen by the entire network.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
BaiMangal
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
February 14, 2014, 07:13:23 PM
 #40

Can an account be setup to be able to send NXT only when it receives same message from a combination of other accounts (3 in my example)?
If that's possible then is it possible to create the account with random generation password that password is not saved in the blockchain?

The "message" can only be another transaction - so I am not quite sure what you think can be achieved as any tx will be seen by the entire network.


Well that's fine that the message can be seen. If I am wasting your time please ignore me.

What I was thinking is:
We create an account with random passphrase, lets say address A.(if that's possible)
Create a script to allow the account with address A to transfer NXT when same messages from fixed number of account addresses are sent to that account A.
The addresses of these fixed accounts (say B,C,D) are listed in the script so if the account A received a message from an account address that is not part of the list of addresses it does nothing. If account A receives identical message from B and C and D (or maybe we can have a condition to be at least 2 of the accounts) then it does what the message suggests, i.e. Sent 10000 to account Z
This way we can have an account controlled from few people.

Pages: « 1 [2] 3 4 5 6 7 8 9 10 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!