From 93f43ccc157f6570af8e8c1add02ff6ce53e131f Mon Sep 17 00:00:00 2001 From: Luke Lee Date: Mon, 13 Jan 2025 17:23:48 -0800 Subject: [PATCH 1/3] chore: add post implementation updates for accuracy Signed-off-by: Luke Lee --- HIP/hip-755.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/HIP/hip-755.md b/HIP/hip-755.md index 1d74272a9..11ce37c3d 100644 --- a/HIP/hip-755.md +++ b/HIP/hip-755.md @@ -10,7 +10,7 @@ status: Accepted last-call-date-time: 2023-07-28T07:00:00Z created: 2023-06-14 discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/pull/755 -updated: 2023-09-18 +updated: 2025-01-13 --- ## Abstract @@ -20,7 +20,7 @@ This proposal addresses the feature gap of a smart contracts ability to interact Since smart contracts executions do not utilize the Hedera signature map they are unable to carry along the authorizations that the Hedera ledger uses to confirm an accounts participation and acknowledgment in a transaction. To address this, Smart Contracts could utilize the Hedera Schedule Service (HSS) by submitting authorizing transactions to indicate acceptance of the previously created scheduled transaction. This flow provides an easy route for asynchronous coordination of transaction approval. -This HIP gives a framework through the Hedera Smart Contract Service (HSCS) to manage scheduled interactions created via HAPI or other future HIP implimentations. +This HIP gives a framework through the Hedera Smart Contract Service (HSCS) to manage scheduled interactions created via HAPI or other future HIP implementations. ## Motivation @@ -37,9 +37,8 @@ By providing a secure mechanism to acquire asynchronous authorization from multi ## User stories 1. As an EOA I would like to initiate a smart contract execution that allows me to sign a scheduled transaction. -2. As an EOA I would like to execute a smart contract transaction that signs a scheduled tranaction without having to deploy an additional smart contract. +2. As an EOA I would like to execute a smart contract transaction that signs a scheduled transaction without having to deploy an additional smart contract. 3. As an EOA I would like to initiate a smart contract execution that prompts a contract to authorize a scheduled transaction. -4. As an EOA I would like to initiate a smart contract execution or query that allows me to extract information about a scheduled transaction. ## Specification @@ -50,32 +49,31 @@ To achieve this a new Hedera Schedule Service (HSS) system contract will need to ### Hedera Schedule Service (HSS) system contract A new `IHederaScheduleService` interface will be implemented to allow accounts to interact with the scheduled transaction service via smart contracts. -Following system contract convention, HSS will be callable at the `0x16a` address and will expose the following methods callable within smart contracts. +Following system contract convention, HSS will be callable at the `0x16b` address and will expose the following methods callable within smart contracts. | Hash | Selector | |---------------|-------------------------------------------------------------------------------------------------------------------| | `0xf0637961` | `authorizeSchedule(address) external returns (int64 responseCode)` | -| `0x5e147101` | `getScheduledTransactionInfo(address) external returns (int64 responseCode, ScheduleInfo memory scheduleInfo)` | | `0x358eeb03` | `signSchedule(address, bytes) external returns (int64 responseCode)` | `signSchedule(address, bytes)` allows a contract to pass along the protobuf serialized signature from an EOA needed for a future schedule transaction. -This supports the prior acquisition of sigatures and their future submission, as often utilized in direct HAPI transaction submissions. - -The `ScheduleInfo` object will be a struct that matches the details of the [ScheduleInfo protobuf message](https://github.com/hashgraph/hedera-protobufs/blob/main/services/schedule_get_info.proto) +This supports the prior acquisition of signatures and their future submission, as often utilized in direct HAPI transaction submissions. +In order to validate the signatures in the signature map for the `signSchedule(address, bytes)` function call, +a message has to be agreed upon. The most logical message would be the concatenated values of the shard, realm and number of the schedule transaction ID and this value will be used +by convention. To support safe and easy direct calls by an EOA in accordance with the security model, new facade methods will be added as part of this HRC 755. | Hash | Selector | |---------------|-----------------------------------------------------------------------------------------------------------| | `0x06d15889` | `signSchedule() external returns (int64 responseCode)` | -| `0x88af14e6` | `getScheduledTransactionInfo() external returns (int64 responseCode, ScheduleInfo memory scheduleInfo)` | `signSchedule()` will not be callable from within a smart contract. For `EthereumTransaction` transactions, `signSchedule()` will reply on the inner ECDSA signature found in the RLP encoded transaction. For `ContractCall` and `ContractCreate` transactions, any applicable signature found in the signature map will be utilized just as with [ScheduleSign](https://github.com/hashgraph/hedera-protobufs/blob/main/services/schedule_sign.proto#L50). -The execution of `authorizeSchedule(address)` or `signSchedule(...)` will execute a synthetic [ScheduleSign](https://github.com/hashgraph/hedera-protobufs/blob/main/services/schedule_sign.proto) child transaction on the network. In this case the submitted `EthereumTransaction` or `ContractCall` will be the parent transaction of the child `ScheduleSign` transaction. -Should the `ScheduleSign` transaction provide the final key authorization of a schedule then in accordance with the HSS logic the inned schedule transaction will be executed by the network. +The execution of `authorizeSchedule(address)` or `signSchedule(address, bytes)` will execute a synthetic [ScheduleSign](https://github.com/hashgraph/hedera-protobufs/blob/main/services/schedule_sign.proto) child transaction on the network. In this case the submitted `EthereumTransaction` or `ContractCall` will be the parent transaction of the child `ScheduleSign` transaction. +Should the `ScheduleSign` transaction provide the final key authorization of a schedule then in accordance with the HSS logic the inner schedule transaction will be executed by the network. Note, this HIP does not provide an API to create a scheduled transaction. This is left to future HIPs to present the appropriate transactions that may be scheduled. No further protobuf or application level changes are needed as HSS is already implemented and functional. @@ -128,7 +126,13 @@ Gas collections should encompass the following aspects of the network ## Rejected Ideas +The following functions were initially considered for implementation but were rejected after the determination that the only necessary +information needed for the flows described above is the `scheduleId`. +In the `IHederaScheduleService` interface: +- `getScheduledTransactionInfo(address)` +In the facade proxy contract +- `getScheduledTransactionInfo()` ## Open Issues From 7fb3f9933dafc1e9752902a3f5bc91644b2dad6c Mon Sep 17 00:00:00 2001 From: Luke Lee Date: Mon, 13 Jan 2025 17:24:55 -0800 Subject: [PATCH 2/3] change updated date Signed-off-by: Luke Lee --- HIP/hip-755.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HIP/hip-755.md b/HIP/hip-755.md index 11ce37c3d..db3740b53 100644 --- a/HIP/hip-755.md +++ b/HIP/hip-755.md @@ -10,7 +10,7 @@ status: Accepted last-call-date-time: 2023-07-28T07:00:00Z created: 2023-06-14 discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/pull/755 -updated: 2025-01-13 +updated: 2025-01-14 --- ## Abstract From 51906a5b1787253c20c0cfbc604475c40a30910a Mon Sep 17 00:00:00 2001 From: Luke Lee Date: Tue, 14 Jan 2025 10:02:35 -0800 Subject: [PATCH 3/3] add requested-by header Signed-off-by: Luke Lee --- HIP/hip-755.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HIP/hip-755.md b/HIP/hip-755.md index db3740b53..c0aab3660 100644 --- a/HIP/hip-755.md +++ b/HIP/hip-755.md @@ -3,6 +3,7 @@ hip: 755 title: Schedule Service System Contract author: Nana Essilfie-Conduah (@nana-ec) working-group: Richard Bair (@rbair23), Jasper Potts (@jasperpotts), Atul Mahamuni <@atul-hedera> +requested-by: Hashgraph type: Standards Track category: Service needs-council-approval: Yes