diff --git a/hapi/hedera-protobufs/platform/event/gossip_event.proto b/hapi/hedera-protobufs/platform/event/gossip_event.proto index eb828b206eed..b0e16fd9b2fc 100644 --- a/hapi/hedera-protobufs/platform/event/gossip_event.proto +++ b/hapi/hedera-protobufs/platform/event/gossip_event.proto @@ -62,7 +62,20 @@ message GossipEvent { *

* This field MAY contain zero transactions.
* This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.
- * This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes. + * This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.
+ * Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.
+ * This is transitional state until 'transaction' field is fully adopted. */ - repeated EventTransaction event_transaction = 3; + repeated EventTransaction event_transaction = 3 [deprecated = true]; + + /** + * A list of serialized transactions. + *

+ * This field MAY contain zero transactions.
+ * Each transaction in this list SHALL be presented exactly as + * it was supplied to the consensus algorithm.
+ * This field MUST contain one entry for each transaction + * included in this gossip event. + */ + repeated bytes transactions = 4; } diff --git a/hapi/hedera-protobufs/services/basic_types.proto b/hapi/hedera-protobufs/services/basic_types.proto index 17c2f91065d8..0b3a4fe6cf52 100644 --- a/hapi/hedera-protobufs/services/basic_types.proto +++ b/hapi/hedera-protobufs/services/basic_types.proto @@ -1269,6 +1269,11 @@ enum HederaFunctionality { * Submit a node public tss encryption key as part of the Threshold Signature Scheme (TSS). */ TssEncryptionKey = 99; + + /** + * Submit a signature of a state root hash gossiped to other nodes + */ + StateSignatureTransaction = 100; } /** diff --git a/hapi/hedera-protobufs/services/transaction_body.proto b/hapi/hedera-protobufs/services/transaction_body.proto index b34c1d9cda1d..8e63143d933b 100644 --- a/hapi/hedera-protobufs/services/transaction_body.proto +++ b/hapi/hedera-protobufs/services/transaction_body.proto @@ -94,6 +94,8 @@ import "auxiliary/tss/tss_vote.proto"; import "auxiliary/tss/tss_share_signature.proto"; import "auxiliary/tss/tss_encryption_key.proto"; +import "event/state_signature_transaction.proto"; + /** * A single transaction. All transaction types are possible here. */ @@ -435,7 +437,7 @@ message TransactionBody { com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody tssVote = 62; /** - * A transaction body for a 'tssShareSignature` request + * A transaction body for node signature as part of the Threshold Signature Scheme (TSS) processing. */ com.hedera.hapi.services.auxiliary.tss.TssShareSignatureTransactionBody tssShareSignature = 63; @@ -443,5 +445,10 @@ message TransactionBody { * A transaction body for a 'tssEncryptionKey` request */ com.hedera.hapi.services.auxiliary.tss.TssEncryptionKeyTransactionBody tssEncryptionKey = 64; + + /** + * A transaction body for signature of a state root hash gossiped to other nodes + */ + com.hedera.hapi.platform.event.StateSignatureTransaction state_signature_transaction = 65; } } diff --git a/hapi/src/main/java/com/hedera/hapi/util/HapiUtils.java b/hapi/src/main/java/com/hedera/hapi/util/HapiUtils.java index 7459f416f8fe..efc3714b9809 100644 --- a/hapi/src/main/java/com/hedera/hapi/util/HapiUtils.java +++ b/hapi/src/main/java/com/hedera/hapi/util/HapiUtils.java @@ -238,6 +238,7 @@ public static HederaFunctionality functionOf(final TransactionBody txn) throws U case TSS_VOTE -> HederaFunctionality.TSS_VOTE; case TSS_SHARE_SIGNATURE -> HederaFunctionality.TSS_SHARE_SIGNATURE; case TSS_ENCRYPTION_KEY -> HederaFunctionality.TSS_ENCRYPTION_KEY; + case STATE_SIGNATURE_TRANSACTION -> HederaFunctionality.STATE_SIGNATURE_TRANSACTION; case UNSET -> throw new UnknownHederaFunctionality(); }; } diff --git a/hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/ApiPermissionConfig.java b/hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/ApiPermissionConfig.java index b2178b37d24a..95ce93a61f07 100644 --- a/hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/ApiPermissionConfig.java +++ b/hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/ApiPermissionConfig.java @@ -56,6 +56,7 @@ import static com.hedera.hapi.node.base.HederaFunctionality.SCHEDULE_DELETE; import static com.hedera.hapi.node.base.HederaFunctionality.SCHEDULE_GET_INFO; import static com.hedera.hapi.node.base.HederaFunctionality.SCHEDULE_SIGN; +import static com.hedera.hapi.node.base.HederaFunctionality.STATE_SIGNATURE_TRANSACTION; import static com.hedera.hapi.node.base.HederaFunctionality.SYSTEM_DELETE; import static com.hedera.hapi.node.base.HederaFunctionality.SYSTEM_UNDELETE; import static com.hedera.hapi.node.base.HederaFunctionality.TOKEN_ACCOUNT_WIPE; @@ -267,7 +268,8 @@ public record ApiPermissionConfig( @ConfigProperty(defaultValue = "0-0") PermissionedAccountsRange tssMessage, @ConfigProperty(defaultValue = "0-0") PermissionedAccountsRange tssVote, @ConfigProperty(defaultValue = "0-0") PermissionedAccountsRange tssShareSignature, - @ConfigProperty(defaultValue = "0-0") PermissionedAccountsRange tssEncryptionKey) { + @ConfigProperty(defaultValue = "0-0") PermissionedAccountsRange tssEncryptionKey, + @ConfigProperty(defaultValue = "0-0") PermissionedAccountsRange stateSignature) { private static final EnumMap> permissionKeys = new EnumMap<>(HederaFunctionality.class); @@ -349,6 +351,7 @@ public record ApiPermissionConfig( permissionKeys.put(TSS_VOTE, c -> c.tssVote); permissionKeys.put(TSS_SHARE_SIGNATURE, c -> c.tssShareSignature); permissionKeys.put(TSS_ENCRYPTION_KEY, c -> c.tssEncryptionKey); + permissionKeys.put(STATE_SIGNATURE_TRANSACTION, c -> c.stateSignature); } /** diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/PlatformEvent.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/PlatformEvent.java index d213a92af842..509d31113eb8 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/PlatformEvent.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/PlatformEvent.java @@ -117,7 +117,9 @@ public PlatformEvent(@NonNull final UnsignedEvent unsignedEvent, @NonNull final Objects.requireNonNull(unsignedEvent, "The unsignedEvent must not be null") .getEventCore(), Objects.requireNonNull(signature, "The signature must not be null"), - unsignedEvent.getEventTransactions()), + unsignedEvent.getEventTransactions(), + // TODO: adapt new transaction format + null), unsignedEvent.getMetadata()); }