SIP: 7

 Layer: Core

 Title: Executable (Extended Transaction)

 Author: Brian Burrell 

 Comments-Summary: No comments yet.


 Status: Final

 Type: Standards Track

 Created: 2018-12-29

 License: PD

This document introduces the ability to create executable calls based on applications published to the ShionCoin block-chain.

See SIP26 for a more comprehensive guide on the how a ShionCoin node processes application calls.

The Executable Extended Transaction provides the base structure for publishing and executing calls.

The executable extended transaction is composed of the following structure;

   /* the originating address of the transaction. */

   uint160 kSender;

   /* the executable code of a SEXE class. */

   cbuff vContext;

   /* a signature certifying the primary contents of the exec/call. */

   CSign signature;

   /* the system time at which the call was initiated. */

   int64 nTime;

   /* the blockchain height at which the call was initiated. */

   int64 nHeight;

   /* the coin value sent to process the method call. */

   int64 nValue;

   /* a hash of the result returned from the method call. */

   uint64 hResult;

   /* the SEXE executable class. */

   uint160 hExec;

   /* the previous call hash */

   uint160 hPrev;

   /* a checksum hash of the class's user-data. */

   uint256 hData;

   /* the name of the method called. */

   cbuff vchMethod;

   /* the arguments passed into the class method. */

   vector vArg;

   /* a list of transactions generated by this exec call. */

   vector vTx;


An executable transaction is composed of either a OP_EXT_NEW or a OP_EXT_GENERATE operation.

A OP_EXT_NEW operation publishes a new set of executable code to the ShionCoin block-chain. The executable code may be in text or binary format. Published executable code will expire after 48 years.

An OP_EXT_GENERATE operation registers that a call was performed into a particular application.

The maximum size of the executable code payload is 780,000 bytes.

This document is placed in the public domain.