Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add needed TransactionOutput fields #415

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
11 changes: 11 additions & 0 deletions block/stream/output/schedule_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ import "basic_types.proto";
* the original transaction.
*/
message CreateScheduleOutput {
/**
* A schedule identifier.
* <p>
* If the status of the transaction is `SUCCESS`, this value SHALL be
* set to the identifier of the schedule that was created.<br/>
* If the transaction status is `IDENTICAL_SCHEDULE_ALREADY_CREATED`,
* this value SHALL be set to the identifier of an existing schedule
* that is identical to the one that was requested.<br/>
* For any other status, this value SHALL NOT be set.
*/
proto.ScheduleID schedule_id = 1;
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be renamed to duplicate_schedule_id?
Also, if we only set this for duplicate schedules, we may need to remove the first specification sentence in the document comment above.

/**
* A scheduled transaction identifier.
* <p>
Expand Down
22 changes: 21 additions & 1 deletion block/stream/output/smart_contract_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,27 @@ message EthereumOutput {
/**
* An ethereum hash value.
* <p>
* This SHALL be a keccak256 hash of the ethereumData.
* This SHALL be a keccak256 hash of the ethereumData<br/>
* This hash SHALL be computed strictly _after_ interpolating
* the calldata from the calldata file (if set).
*/
bytes ethereum_hash = 2;

oneof eth_result {
/**
* A result for an Ethereum _contract call_ transaction.
* <p>
* This field SHALL contain all of the data produced by the contract
* call transaction as well as basic accounting results.
*/
proto.ContractFunctionResult ethereum_call_result = 3;

/**
* A result for an Ethereum _contract create_ transaction.
* <p>
* This field SHALL contain all of the data produced by the contract
* create transaction as well as basic accounting results.
*/
proto.ContractFunctionResult ethereum_create_result = 4;
}
}
18 changes: 18 additions & 0 deletions block/stream/output/token_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ option java_package = "com.hedera.hapi.block.stream.output.protoc";
// <<<pbj.java_package = "com.hedera.hapi.block.stream.output">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "custom_fees.proto";
import "transaction_record.proto";

/**
* Block Stream data for a `createToken` transaction.
*
Expand Down Expand Up @@ -161,3 +164,18 @@ message UnpauseTokenOutput {}
* the original transaction.
*/
message UpdateTokenNftsOutput {}

/**
* Block Stream data for a `tokenAirdrop` transaction.
*
* This message SHALL NOT duplicate information already contained in
* the original transaction.
*/
message TokenAirdropOutput {
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
/**
* Custom fees assessed during a TokenAirdrop.
* <p>
* These fees SHALL be present in the full transfer list for the transaction.
*/
repeated proto.AssessedCustomFee assessed_custom_fees = 1;
}
6 changes: 6 additions & 0 deletions block/stream/output/transaction_output.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ option java_multiple_files = true;
import "stream/output/schedule_service.proto";
import "stream/output/util_service.proto";
import "stream/output/crypto_service.proto";
import "stream/output/token_service.proto";
import "stream/output/smart_contract_service.proto";

/**
Expand Down Expand Up @@ -149,5 +150,10 @@ message TransactionOutput {
* executing the scheduled transaction.
*/
SignScheduleOutput sign_schedule = 7;

/**
* Output from a token airdrop transaction.
*/
TokenAirdropOutput token_airdrop = 8;
}
}
13 changes: 10 additions & 3 deletions services/state/blockstream/block_stream_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ message BlockStreamInfo {

/**
* A consensus time for the current block.<br/>
* This is the _first_ consensus time in the current block, and
* is used to determine if this block was the first across an
* This is the consensus time of the first round in the current block,
* and is used to determine if this block was the first across an
* important boundary in consensus time, such as UTC midnight.
* This may also be used to purge entities expiring between the last
* block time and this time.
Expand All @@ -71,7 +71,8 @@ message BlockStreamInfo {
* A concatenation of hash values.<br/>
* This combines several trailing output block item hashes and
* is used as a seed value for a pseudo-random number generator.<br/>
* This is also requiried to implement the EVM `PREVRANDAO` opcode.
* This is also requiried to implement the EVM `PREVRANDAO` opcode.<br/>
* This MUST contain at least 256 bits of entropy.
*/
bytes trailing_output_hashes = 3;

Expand All @@ -83,6 +84,12 @@ message BlockStreamInfo {
* hash SHALL be for block number N-256.<br/>
* The latest available hash SHALL be for block N-1.<br/>
* This is REQUIRED to implement the EVM `BLOCKHASH` opcode.
* <p>
* <div style="display: block;font-size: .83em;margin-top: 1.67em;margin-bottom: 1.67em;margin-left: 0;margin-right: 0;font-weight: bold;">Field Length</div>
* Each hash value SHALL be the trailing 265 bits of a SHA2-384 hash.<br/>
* The length of this field SHALL be an integer multiple of 32 bytes.<br/>
* This field SHALL be at least 32 bytes.<br/>
* The maximum length of this field SHALL be 8192 bytes.
*/
bytes trailing_block_hashes = 4;
}