From 3e5a49390af6974be7358d7e842b20069379c369 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Fri, 18 Oct 2024 18:24:06 +0900 Subject: [PATCH 01/30] [KIP] Added new KIP for calldata gas reduction --- KIPs/kip-xx.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 KIPs/kip-xx.md diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md new file mode 100644 index 0000000..bc33251 --- /dev/null +++ b/KIPs/kip-xx.md @@ -0,0 +1,51 @@ +--- +kip: to be assigned +title: Transaction data gas cost reduction +author: Lake (@hyunsooda) and Ollie (@blukat29) +discussions-to: https://github.com/klaytn/kips/issues/163 # TODO: Revise me +status: Draft +type: Standards Track +category: Core +created: 2024-10-18 +--- + +## Simple Summary + +Changing to calldata gas cost. + +## Abstract + +This KIP introduces a new tag for calldata gas payment, defining a calculation method that distinguishes between zero and non-zero bytes, with distinct costs assigned to each byte. + +## Motivation + +TBD + +## Specification + +The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119. + +The gas cost distinguishes between non-zero and zero bytes, assigning 16 and 4 gas units to each, respectively. + +### Overview + +Since the genesis block, calldata gas calculation has followed two branches: + +- Non-zero bytes: 68 gas units per byte +- Zero bytes: 4 gas units per byte +With the Istanbul hardfork, the gas calculation was modified to no longer distinguish between zero and non-zero bytes, introducing a flat rate of 100 gas units per byte. + +The Prague hardfork reverted to the original logic from the genesis block, reintroducing the distinction between non-zero and zero bytes. However, the assigned costs were adjusted to 16 gas units per non-zero byte and 4 gas units per zero byte. + +In summary, these changes result in a reduction of 84 gas units per non-zero byte and 96 gas units per zero byte. + +## Backward Compatibility + +Since the Kaia client implementation applies different logic based on the hardfork state, the correct gas cost is determined according to the block number associated with each hardfork. + +## References +[EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From d9b5c982a05c0746165da930f8467b99a4b0ea70 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Fri, 18 Oct 2024 18:27:50 +0900 Subject: [PATCH 02/30] [KIP] `discussions-to` revised with correct link --- KIPs/kip-xx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index bc33251..a9e557d 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -2,7 +2,7 @@ kip: to be assigned title: Transaction data gas cost reduction author: Lake (@hyunsooda) and Ollie (@blukat29) -discussions-to: https://github.com/klaytn/kips/issues/163 # TODO: Revise me +discussions-to: https://github.com/kaiachain/kips/issues/22 status: Draft type: Standards Track category: Core From 0a02a1e51efe03ebbed3e64d614f6b040702f2fd Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Fri, 18 Oct 2024 18:29:23 +0900 Subject: [PATCH 03/30] [] Alined --- KIPs/kip-xx.md | 1 + 1 file changed, 1 insertion(+) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index a9e557d..beb3948 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -33,6 +33,7 @@ Since the genesis block, calldata gas calculation has followed two branches: - Non-zero bytes: 68 gas units per byte - Zero bytes: 4 gas units per byte + With the Istanbul hardfork, the gas calculation was modified to no longer distinguish between zero and non-zero bytes, introducing a flat rate of 100 gas units per byte. The Prague hardfork reverted to the original logic from the genesis block, reintroducing the distinction between non-zero and zero bytes. However, the assigned costs were adjusted to 16 gas units per non-zero byte and 4 gas units per zero byte. From 639a7d2bd5260f219be173720b15dba4e26b942e Mon Sep 17 00:00:00 2001 From: "Hyunsoo Shin (Lake)" Date: Mon, 21 Oct 2024 09:28:48 +0900 Subject: [PATCH 04/30] Update KIPs/kip-xx.md Co-authored-by: Yunjong Jeong (ollie) <5933330+blukat29@users.noreply.github.com> --- KIPs/kip-xx.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index beb3948..e780b8b 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -42,7 +42,9 @@ In summary, these changes result in a reduction of 84 gas units per non-zero byt ## Backward Compatibility -Since the Kaia client implementation applies different logic based on the hardfork state, the correct gas cost is determined according to the block number associated with each hardfork. +The gas pricing change is backwards incompatible since the hardfork. + +SDKs and Wallets will be able to continue operating with no change as they usually use `eth_estimateGas` API. ## References [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) From ae1ff4bdebe569078a6cb83056a433fd288e965e Mon Sep 17 00:00:00 2001 From: "Hyunsoo Shin (Lake)" Date: Mon, 21 Oct 2024 09:31:42 +0900 Subject: [PATCH 05/30] Update KIPs/kip-xx.md Co-authored-by: Yunjong Jeong (ollie) <5933330+blukat29@users.noreply.github.com> --- KIPs/kip-xx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index e780b8b..251613a 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -15,7 +15,7 @@ Changing to calldata gas cost. ## Abstract -This KIP introduces a new tag for calldata gas payment, defining a calculation method that distinguishes between zero and non-zero bytes, with distinct costs assigned to each byte. +Reduce the calldata gas costs to the EIP-2028 level. The purpose is to achieve better compatibility with Ethereum-oriented SDKs and tools. ## Motivation From c9d74139dad2587bd9d6da577970f7aa6fd6f5ac Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Mon, 21 Oct 2024 10:00:17 +0900 Subject: [PATCH 06/30] [KIP] History structured --- KIPs/kip-xx.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 251613a..d16eb6d 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -29,16 +29,20 @@ The gas cost distinguishes between non-zero and zero bytes, assigning 16 and 4 g ### Overview -Since the genesis block, calldata gas calculation has followed two branches: +The calldata costs has been depending on the transaction types and hardfork levels. -- Non-zero bytes: 68 gas units per byte -- Zero bytes: 4 gas units per byte +Since the genesis block, calldata gas calculation was calculated using the formula: +Transaction type 0 (Legacy): +`nonzero_bytes_in_calldata` * 68 + `zero_bytes_in_calldata` * 4 +Other types: +`nonzero_bytes_in_calldata` * 100 + `zero_bytes_in_calldata` * 100 -With the Istanbul hardfork, the gas calculation was modified to no longer distinguish between zero and non-zero bytes, introducing a flat rate of 100 gas units per byte. +Since the Istanbul hardfork, the calculation was simplified to the latter: +For all transaction types: `nonzero_bytes_in_calldata` * 100 + `zero_bytes_in_calldata` * 100 -The Prague hardfork reverted to the original logic from the genesis block, reintroducing the distinction between non-zero and zero bytes. However, the assigned costs were adjusted to 16 gas units per non-zero byte and 4 gas units per zero byte. - -In summary, these changes result in a reduction of 84 gas units per non-zero byte and 96 gas units per zero byte. +This proposal introduces a new hardfork in which the formula will be: +For all transaction types: `nonzero_bytes_in_calldata` * 16 + `zero_bytes_in_calldata` * 4 +which is identical to [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028). ## Backward Compatibility From 7880aec5bdb70af08103ea5d9fc1ea2e9c22d0ca Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Mon, 21 Oct 2024 10:33:25 +0900 Subject: [PATCH 07/30] [KIP-XX] Remove RF2119 --- KIPs/kip-xx.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index d16eb6d..4e28843 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -23,8 +23,6 @@ TBD ## Specification -The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119. - The gas cost distinguishes between non-zero and zero bytes, assigning 16 and 4 gas units to each, respectively. ### Overview From bde69cad1e3a92f89b8c9f3b2ec11c4d55eba439 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Mon, 21 Oct 2024 10:33:58 +0900 Subject: [PATCH 08/30] [KIP-XX] Removed `Simple Summary` section --- KIPs/kip-xx.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 4e28843..0cefc5a 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -9,10 +9,6 @@ category: Core created: 2024-10-18 --- -## Simple Summary - -Changing to calldata gas cost. - ## Abstract Reduce the calldata gas costs to the EIP-2028 level. The purpose is to achieve better compatibility with Ethereum-oriented SDKs and tools. From 469fe0e96e917924559d5a419175d154326a68f8 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Mon, 21 Oct 2024 11:04:16 +0900 Subject: [PATCH 09/30] [KIP-XX] `Motivation` section filled in --- KIPs/kip-xx.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 0cefc5a..3fbb4d1 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -11,11 +11,15 @@ created: 2024-10-18 ## Abstract -Reduce the calldata gas costs to the EIP-2028 level. The purpose is to achieve better compatibility with Ethereum-oriented SDKs and tools. +Reduce the calldata gas costs to the [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) level. The purpose is to achieve better compatibility with Ethereum-oriented SDKs and tools. ## Motivation -TBD +Since the introduction of [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028), several bundler software solutions have been developed. + +The eth_estimateUserOperationGas API calculates the gas required for a userOperation. This estimate is computed based on the input’s composition, which includes both nonzero and zero bytes. Following the Istanbul hardfork, Ethereum set the gas cost at 16 gas per nonzero byte and 4 gas per zero byte. As a result, some bundlers have adopted predefined gas costs for these byte types. + +To maintain compatibility with Ethereum's tooling ecosystem, the Kaia mainnet aligns its gas pricing with the specifications of EIP-2028 introduced in the Prague hardfork, which defines new costs for nonzero and zero bytes. ## Specification From 80b092687d1bc2c960d5b7c83edf01d90c151f87 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Mon, 21 Oct 2024 11:05:28 +0900 Subject: [PATCH 10/30] [KIP-XX] Code annotation --- KIPs/kip-xx.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 3fbb4d1..505ca06 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -17,7 +17,8 @@ Reduce the calldata gas costs to the [EIP-2028](https://eips.ethereum.org/EIPS/e Since the introduction of [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028), several bundler software solutions have been developed. -The eth_estimateUserOperationGas API calculates the gas required for a userOperation. This estimate is computed based on the input’s composition, which includes both nonzero and zero bytes. Following the Istanbul hardfork, Ethereum set the gas cost at 16 gas per nonzero byte and 4 gas per zero byte. As a result, some bundlers have adopted predefined gas costs for these byte types. +The `eth_estimateUserOperationGas` API calculates the gas required for a userOperation. This estimate is computed based on the input’s composition, which includes both nonzero and zero bytes. Following the Istanbul hardfork, Ethereum set the gas cost at 16 gas per nonzero byte and 4 gas per zero byte. +As a result, some bundlers have adopted predefined gas costs for these byte types. To maintain compatibility with Ethereum's tooling ecosystem, the Kaia mainnet aligns its gas pricing with the specifications of EIP-2028 introduced in the Prague hardfork, which defines new costs for nonzero and zero bytes. From 8e97b0513d8f2d1f81d870f40870fbeedaf9aec5 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Tue, 22 Oct 2024 22:12:25 +0900 Subject: [PATCH 11/30] [KIP-XX] Remove a specific hardfork name and refined `specification` --- KIPs/kip-xx.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 505ca06..0c5a747 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -15,16 +15,18 @@ Reduce the calldata gas costs to the [EIP-2028](https://eips.ethereum.org/EIPS/e ## Motivation -Since the introduction of [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028), several bundler software solutions have been developed. +Since the introduction of [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), several bundler software solutions have been developed. -The `eth_estimateUserOperationGas` API calculates the gas required for a userOperation. This estimate is computed based on the input’s composition, which includes both nonzero and zero bytes. Following the Istanbul hardfork, Ethereum set the gas cost at 16 gas per nonzero byte and 4 gas per zero byte. +The `eth_estimateUserOperationGas` API calculates the gas required for a userOperation. +This estimate is computed based on the input’s composition, which includes both nonzero and zero bytes. +Following the Istanbul hardfork, Ethereum set the gas cost at 16 gas per nonzero byte and 4 gas per zero byte. As a result, some bundlers have adopted predefined gas costs for these byte types. -To maintain compatibility with Ethereum's tooling ecosystem, the Kaia mainnet aligns its gas pricing with the specifications of EIP-2028 introduced in the Prague hardfork, which defines new costs for nonzero and zero bytes. +To maintain compatibility with Ethereum's tooling ecosystem, the Kaia mainnet aligns its gas pricing with the specifications of EIP-2028 introduced in the new hardfork, which defines new costs for nonzero and zero bytes. ## Specification -The gas cost distinguishes between non-zero and zero bytes, assigning 16 and 4 gas units to each, respectively. +The gas cost for calldata is determined by the number of non-zero and zero bytes, with each non-zero byte costing 16 gas units and each zero byte costing 4 gas units. ### Overview From 9fd34bf9cf1570d5ec055bc7474c68b4c9e4e891 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Wed, 23 Oct 2024 12:36:58 +0900 Subject: [PATCH 12/30] [KIP-XX] Emphasize the ecosystem alignment rather the new cost tag --- KIPs/kip-xx.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 0c5a747..de8e890 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -15,14 +15,12 @@ Reduce the calldata gas costs to the [EIP-2028](https://eips.ethereum.org/EIPS/e ## Motivation -Since the introduction of [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), several bundler software solutions have been developed. - -The `eth_estimateUserOperationGas` API calculates the gas required for a userOperation. -This estimate is computed based on the input’s composition, which includes both nonzero and zero bytes. -Following the Istanbul hardfork, Ethereum set the gas cost at 16 gas per nonzero byte and 4 gas per zero byte. -As a result, some bundlers have adopted predefined gas costs for these byte types. - -To maintain compatibility with Ethereum's tooling ecosystem, the Kaia mainnet aligns its gas pricing with the specifications of EIP-2028 introduced in the new hardfork, which defines new costs for nonzero and zero bytes. +The adoption of [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) will improve the compatibility with [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) ecosystem tools. +Since the introduction of [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337), several bundler software solutions have been developed. +The bundler's `eth_estimateUserOperationGas` API calculates the gas required for a UserOperation. +The calculation depends on the calldata costs in a UserOperation. +The issue is that some tools assumes EIP-2028 rule [unless explicitly configured](https://github.com/eth-infinitism/bundler/blob/f4647969386aa859b7edf608467168d140e5f92c/packages/sdk/src/PreVerificationGasCalculator.ts#L44-L54), making their result incompatible with Kaia. +This proposal introduces a new hardfork that aligns the calldata cost calculation to that of EIP-2028. ## Specification From 98c14c0afecf15468a1888ed44aa81389927b8e1 Mon Sep 17 00:00:00 2001 From: "ollie.j" Date: Fri, 15 Nov 2024 18:21:10 +0900 Subject: [PATCH 13/30] Add SetCode KIP --- KIPs/kip-xxx.md | 177 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 KIPs/kip-xxx.md diff --git a/KIPs/kip-xxx.md b/KIPs/kip-xxx.md new file mode 100644 index 0000000..d5c9fba --- /dev/null +++ b/KIPs/kip-xxx.md @@ -0,0 +1,177 @@ +--- +kip: TBD +title: SetCode for EOA +author: Ollie (@blukat29), Garry (@Mdaiki0730), Shiki (@shiki-tak) +discussions-to: TBD +status: Draft +type: Standards Track +category: Core +created: 2024-11-15 +--- + +## Abstract + +Add a new transaction type to assign a code to an EOA. This KIP focuses on describing the difference from [EIP-7702](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md). + +## Motivation + +TBU + +## Specification + +### Parameters + +| Parameter | Value | +|-|-| +| `EMPTY_CODE_HASH` | `0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470` | +| `SET_CODE_TX_TYPE` | `0x04` | +| `ENVELOPED_SET_CODE_TX_TYPE` | `0x7804` | + +### SetCode Transaction + +Introduce the SetCode transaction type where its RLP encoding is defined below. + +``` +0x7804 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, value, data, access_list, authorization_list, signature_y_parity, signature_r, signature_s]) + +authorization_list = [[chain_id, address, nonce, y_parity, r, s], ...] +``` + +The fields follow the same semantics as EIP-7702. + +Its consensus type prefix (that affects `block.transactionRoot`) is `ENVELOPED_SET_CODE_TX_TYPE (0x7804)` and its eth namespace API type prefix is `SET_CODE_TX_TYPE (0x04)`. See “Changes to API” for clarification. + +#### Behavior + +The transaction’s behavior follows that of EIP-7702 except for the following: + +- For each authorization tuple `[chain_id, address, nonce, y_parity, r, s]`, fetch the AccontKey field of the recovered authority account. +- Verify that the AccountKey is of type `AccountKeyTypeLegacy`. If verification fails, immediately stop processing the tuple and continue to the next tuple in the list. + +#### Delegation Designation + +Semantics of `EXTCODESIZE`, `EXTCODECOPY`, `EXTCODEHASH`, `CALL`, `CALLCODE`, `STATICCALL`, `DELEGATECALL` opcodes follows EIP-7702. + +#### Gas costs + +The intrinsic gas cost of a SetCode transaction follows the EIP-7702, meaning it inherits [EIP-2930](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2930.md) and [EIP-2028](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2028.md). Note that the EIP-2028 rule is realized by by KIP-xxx. + +#### Transaction Origination + +Since Kaia hasn't been explicitly enforcing [EIP-3607](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3607.md), there is no need to modify transaction origin restriction. + +Do follow the EIP-7702’s behavior where if a transaction’s destination has a delegation, also warm its target + +### Account State + +The account RLP encoding for the world state trie needs to change. + +``` +EOA's compact encoding: 0x01 || rlp([nonce, balance, humanReadable, accountKey]) +EOA's full encoding: 0x01 || rlp([[nonce, balance, humanReadable, accountKey], storageRoot, codeHash, codeInfo]) +SCA's encoding: 0x02 || rlp([[nonce, balance, humanReadable, accountKey], storageRoot, codeHash, codeInfo]) +``` + +Now both EOAs and SCAs hold the same set of 7 fields: `nonce`, `balance`, `humanReadable`, `accountKey`, `storageRoot`, `codeHash`, and `codeInfo`. + +When an EOA is RLP encoded, the compact encoding is used when the account has storageRoot = 0x0, codeHash = EMPTY_CODE_HASH, and codeInfo = 0x0. Conversely, when decoding an RLP-encoded EOA, the compact encoding implies that the account has storageRoot = 0x0, codeHash = EMPTY_CODE_HASH, and codeInfo = 0x0. + +If an EOA’s delegation was cleared by a SetCode transaction with authorization.address = 0x0, set its CodeHash to EMPTY_CODE_HASH as per EIP-7702, and also set its CodeInfo to 0x0. Note that the account does not necessarily return to compact encoding. It will be compactly encoded only if storageRoot is 0x0. + +An EOA with codeHash = EMPTY_CODE_HASH can be called “EOA without code” and an EOA with codeHash != EMPTY_CODE_HASH can be called “EOA with code”. Note that EOA without code doesn’t always mean it will be compactly encoded. + +### Interaction with other transaction types + +The `to` address of the following transaction types MUST be an EOA without code: + +- `TxTypeValueTransfer` +- `TxTypeFeeDelegatedValueTransfer` +- `TxTypeFeeDelegatedValueTransferWithRatio` +- `TxTypeValueTransferMemo` +- `TxTypeFeeDelegatedValueTransferMemo` +- `TxTypeFeeDelegatedValueTransferMemoWithRatio` + +The `from` address of the following transaction types MUST be an EOA without code: + +- `TxTypeAccountUpdate` +- `TxTypeFeeDelegatedAccountUpdate` +- `TxTypeFeeDelegatedAccountUpdateWithRatio` + +The `to` address of the following transaction types MUST be an EOA with code or an SCA: + +- `TxTypeSmartContractExecution` +- `TxTypeFeeDelegatedSmartContractExecution` +- `TxTypeFeeDelegatedSmartContractExecutionWithRatio` + +Note that whether the storageRoot is 0x0 or not does not matter in transaction type restrictions. + +### Changes to APIs + +#### eth_getRawTransaction, eth_sendRawTransaction + +eth_getRawTransaction returns the raw transaction RLP prefixed with `SET_CODE_TX_TYPE (0x04)` and eth_sendRawTransaction accepts such raw transaction. + +#### kaia_getRawTransaction, kaia_sendRawTransaction + +kaia_getRawTransaction returns the raw transaction RLP prefixed with `ENVELOPED_SET_CODE_TX_TYPE (0x7804)` and kaia_sendRawTransaction accepts such raw transaction. + +#### eth_getBlock*, eth_getTransaction*, eth_getTransactionReceipt + +For SetCode transaction type, eth namespace APIs that return the transaction fields MUST show the `authorizationList` field and its `type: "0x04"`. + +#### kaia_getBlock*, kaia_getTransaction*, kaia_getTransactionReceipt + +For SetCode transaction type, kaia namespace APIs that return the transaction fields MUST show the `authorizationList` field and its `typeInt: 30724`, and `type: "TxTypeEthereumSetCode"`. + +#### eth_getCode, eth_getStorageAt, kaia_getCode, kaia_getStorageAt + +APIs querying the code and storage of an account MUST work correctly for EOA if its storageRoot is not 0x0. + +#### kaia_getAccount + +For both EOAs and SCAs, its kaia_getAccount result SHOULD include storageRoot, codeHash, codeFormat, vmVersion fields. + +### Changes to SDK + +Before an SDK signs an authorization tuple, the SDK MAY verify that the authority’s AccountKey is of type AccountKeyTypeLegacy. If the SDK does not verify, it is the responsibility of the SDK user (e.g. Wallet) to make sure the authority is eligible to use the SetCode transaction. + +## Rationale + +### Extending the EOA instead of converting to SCA + +Because the feature is called “Set EOA account code”, there could be a need to distinguish between EOA with code and an SCA. + +### EOAs with updated AccountKeys cannot sign authorization + +In Kaia, EOAs may change the transaction signing permissions by sending an AccountUpdate transaction. But in this KIP, we strictly let the original private key (i.e. the one that AccountKeyLegacy accepts) to sign the SetCode authorization. Decoupling the two permissions will be confusing, so EOAs with code must have AccountKeyLegacy at all times. + +### EOA RLP formats depend on field values + +For backward compatibility, we have to retain the compact encoding. + +If we choose to select the encoding depending on hardfork instead, then all trie handling code must be fork-aware, and coding in that is non-trivial. + +### Kaia transaction type restrictions + +ValueTransfer transaction types cannot be sent to EOAs with code. Kaia’s ValueTransfer transaction types have the semantics of simply increasing the balance of the destination EOA. If ValueTransfer can target EOA with code, the balance increase would bypass the EOA’s fallback() or receive() function. Opening a way to bypass the fallback may have an unknown security implication, thus prohibiting such a case. + +AccountUpdate transaction types cannot be sent to EOAs with code. The reason is the same as why EOAs with updated AccountKeys cannot sign authorization. + +SmartContractExecution transaction types can be sent to EOAs with code. Kaia’s SmartContractExecution transaction types had the semantics of executing the code of the destination SCA. Now that EOAs with code has a code, SmartContractExecution transactions indeed can invoke them. + +## Backwards Compatibility + +The stateRoot calculation is backward compatible because we retain the EOA’s compact encoding. + +## Implementation + +[draft implementation](https://github.com/kaiachain/kaia/tree/feat/eip-7702) + +## References + +- [EIP-7702](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). + From 0ed76c9656accb984413f1998d199147833dd1e6 Mon Sep 17 00:00:00 2001 From: "ollie.j" Date: Tue, 19 Nov 2024 09:59:15 +0900 Subject: [PATCH 14/30] setcode: EOA storageRoot defaults to EMPTY_ROOT_HASH --- KIPs/kip-xxx.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/KIPs/kip-xxx.md b/KIPs/kip-xxx.md index d5c9fba..79cdb19 100644 --- a/KIPs/kip-xxx.md +++ b/KIPs/kip-xxx.md @@ -23,6 +23,7 @@ TBU | Parameter | Value | |-|-| +| `EMPTY_ROOT_HASH` | `0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421` | | `EMPTY_CODE_HASH` | `0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470` | | `SET_CODE_TX_TYPE` | `0x04` | | `ENVELOPED_SET_CODE_TX_TYPE` | `0x7804` | @@ -74,9 +75,9 @@ SCA's encoding: 0x02 || rlp([[nonce, balance, humanReadable, accountKey] Now both EOAs and SCAs hold the same set of 7 fields: `nonce`, `balance`, `humanReadable`, `accountKey`, `storageRoot`, `codeHash`, and `codeInfo`. -When an EOA is RLP encoded, the compact encoding is used when the account has storageRoot = 0x0, codeHash = EMPTY_CODE_HASH, and codeInfo = 0x0. Conversely, when decoding an RLP-encoded EOA, the compact encoding implies that the account has storageRoot = 0x0, codeHash = EMPTY_CODE_HASH, and codeInfo = 0x0. +When an EOA is RLP encoded, the compact encoding is used when the account has storageRoot = EMPTY_ROOT_HASH, codeHash = EMPTY_CODE_HASH, and codeInfo = 0x0. Conversely, when decoding an RLP-encoded EOA, the compact encoding implies that the account has storageRoot = EMPTY_ROOT_HASH, codeHash = EMPTY_CODE_HASH, and codeInfo = 0x0. -If an EOA’s delegation was cleared by a SetCode transaction with authorization.address = 0x0, set its CodeHash to EMPTY_CODE_HASH as per EIP-7702, and also set its CodeInfo to 0x0. Note that the account does not necessarily return to compact encoding. It will be compactly encoded only if storageRoot is 0x0. +If an EOA’s delegation was cleared by a SetCode transaction with authorization.address = 0x0, set its CodeHash to EMPTY_CODE_HASH as per EIP-7702, and also set its CodeInfo to 0x0. Note that the account does not necessarily return to compact encoding. It will be compactly encoded only if storageRoot is EMPTY_ROOT_HASH. An EOA with codeHash = EMPTY_CODE_HASH can be called “EOA without code” and an EOA with codeHash != EMPTY_CODE_HASH can be called “EOA with code”. Note that EOA without code doesn’t always mean it will be compactly encoded. @@ -103,7 +104,7 @@ The `to` address of the following transaction types MUST be an EOA with code or - `TxTypeFeeDelegatedSmartContractExecution` - `TxTypeFeeDelegatedSmartContractExecutionWithRatio` -Note that whether the storageRoot is 0x0 or not does not matter in transaction type restrictions. +Note that whether the emptiness of storageRoot does not matter in transaction type restrictions. ### Changes to APIs @@ -125,7 +126,7 @@ For SetCode transaction type, kaia namespace APIs that return the transaction fi #### eth_getCode, eth_getStorageAt, kaia_getCode, kaia_getStorageAt -APIs querying the code and storage of an account MUST work correctly for EOA if its storageRoot is not 0x0. +APIs querying the code and storage of an account MUST work correctly for EOAs. #### kaia_getAccount From 58e7bcd51dde875f29c9538dfb66e9623c91e738 Mon Sep 17 00:00:00 2001 From: "ollie.j" Date: Wed, 20 Nov 2024 10:34:04 +0900 Subject: [PATCH 15/30] setcode: Clarify kaia_isContractAccount and Eth txtypes --- KIPs/kip-xxx.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/KIPs/kip-xxx.md b/KIPs/kip-xxx.md index 79cdb19..53588e1 100644 --- a/KIPs/kip-xxx.md +++ b/KIPs/kip-xxx.md @@ -128,10 +128,12 @@ For SetCode transaction type, kaia namespace APIs that return the transaction fi APIs querying the code and storage of an account MUST work correctly for EOAs. -#### kaia_getAccount +#### kaia_getAccount, kaia_isContractAccount For both EOAs and SCAs, its kaia_getAccount result SHOULD include storageRoot, codeHash, codeFormat, vmVersion fields. +For both EOAs and SCAs, kaia_isContractAccount SHOULD return true if its codeHash is not EMPTY_CODE_HASH. + ### Changes to SDK Before an SDK signs an authorization tuple, the SDK MAY verify that the authority’s AccountKey is of type AccountKeyTypeLegacy. If the SDK does not verify, it is the responsibility of the SDK user (e.g. Wallet) to make sure the authority is eligible to use the SetCode transaction. @@ -164,6 +166,8 @@ SmartContractExecution transaction types can be sent to EOAs with code. Kaia’s The stateRoot calculation is backward compatible because we retain the EOA’s compact encoding. +The semantics of Ethereum typed transactions are backward compatible. If the target account has nonempty code, the code is executed. + ## Implementation [draft implementation](https://github.com/kaiachain/kaia/tree/feat/eip-7702) From 2cbe13b880359df783458ff830dcd54360ad0a28 Mon Sep 17 00:00:00 2001 From: "Hyunsoo Shin (Lake)" Date: Mon, 25 Nov 2024 18:28:14 +0900 Subject: [PATCH 16/30] Update KIPs/kip-xx.md Co-authored-by: Lewis --- KIPs/kip-xx.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index de8e890..7c7a83e 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -4,8 +4,7 @@ title: Transaction data gas cost reduction author: Lake (@hyunsooda) and Ollie (@blukat29) discussions-to: https://github.com/kaiachain/kips/issues/22 status: Draft -type: Standards Track -category: Core +type: Core created: 2024-10-18 --- From 38be11341fed950fc9e1a393bda7a5cabd93961f Mon Sep 17 00:00:00 2001 From: "Hyunsoo Shin (Lake)" Date: Mon, 25 Nov 2024 23:31:19 +0900 Subject: [PATCH 17/30] Update KIPs/kip-xx.md Co-authored-by: Lewis --- KIPs/kip-xx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KIPs/kip-xx.md b/KIPs/kip-xx.md index 7c7a83e..5826800 100644 --- a/KIPs/kip-xx.md +++ b/KIPs/kip-xx.md @@ -1,5 +1,5 @@ --- -kip: to be assigned +kip: 223 title: Transaction data gas cost reduction author: Lake (@hyunsooda) and Ollie (@blukat29) discussions-to: https://github.com/kaiachain/kips/issues/22 From 46155ba65d93671942f1f13d94d639e3f3c25280 Mon Sep 17 00:00:00 2001 From: "Yunjong Jeong (ollie)" <5933330+blukat29@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:54:36 +0900 Subject: [PATCH 18/30] Update kip-xxx.md --- KIPs/kip-xxx.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/KIPs/kip-xxx.md b/KIPs/kip-xxx.md index 53588e1..d86311d 100644 --- a/KIPs/kip-xxx.md +++ b/KIPs/kip-xxx.md @@ -1,12 +1,12 @@ --- -kip: TBD +kip: KIP-228 title: SetCode for EOA author: Ollie (@blukat29), Garry (@Mdaiki0730), Shiki (@shiki-tak) discussions-to: TBD status: Draft -type: Standards Track category: Core created: 2024-11-15 +requires: 223 --- ## Abstract @@ -15,7 +15,7 @@ Add a new transaction type to assign a code to an EOA. This KIP focuses on descr ## Motivation -TBU +Improve user experience by allowing account abstraction features to already existing EOAs. Previously, for EOA owners to benefit from ERC-4337 interface, they had to create a new smart account and migrate all assets and privileges. With EIP-7702, users can attach code to an existing EOA in-place. ## Specification @@ -46,7 +46,7 @@ Its consensus type prefix (that affects `block.transactionRoot`) is `ENVELOPED_S The transaction’s behavior follows that of EIP-7702 except for the following: -- For each authorization tuple `[chain_id, address, nonce, y_parity, r, s]`, fetch the AccontKey field of the recovered authority account. +- For each authorization tuple `[chain_id, address, nonce, y_parity, r, s]`, fetch the AccountKey field of the recovered authority account. - Verify that the AccountKey is of type `AccountKeyTypeLegacy`. If verification fails, immediately stop processing the tuple and continue to the next tuple in the list. #### Delegation Designation @@ -55,7 +55,7 @@ Semantics of `EXTCODESIZE`, `EXTCODECOPY`, `EXTCODEHASH`, `CALL`, `CALLCODE`, `S #### Gas costs -The intrinsic gas cost of a SetCode transaction follows the EIP-7702, meaning it inherits [EIP-2930](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2930.md) and [EIP-2028](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2028.md). Note that the EIP-2028 rule is realized by by KIP-xxx. +The intrinsic gas cost of a SetCode transaction follows the EIP-7702, meaning it inherits [EIP-2930](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2930.md) and [EIP-2028](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2028.md). Note that the EIP-2028 rule is realized by [KIP-223](https://github.com/kaiachain/kips/blob/main/KIPs/kip-223.md). #### Transaction Origination @@ -179,4 +179,3 @@ The semantics of Ethereum typed transactions are backward compatible. If the tar ## Copyright Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). - From 26542f98be3069cdf7a7a61470c0ab98e4c610ec Mon Sep 17 00:00:00 2001 From: "ollie.j" Date: Tue, 26 Nov 2024 09:55:03 +0900 Subject: [PATCH 19/30] setcode: Rename to kip-228 --- KIPs/{kip-xxx.md => kip-228.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename KIPs/{kip-xxx.md => kip-228.md} (100%) diff --git a/KIPs/kip-xxx.md b/KIPs/kip-228.md similarity index 100% rename from KIPs/kip-xxx.md rename to KIPs/kip-228.md From 556d634a8a10acf105a61978f696c9213b0d1de6 Mon Sep 17 00:00:00 2001 From: "Yunjong Jeong (ollie)" <5933330+blukat29@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:59:11 +0900 Subject: [PATCH 20/30] Update KIPs/kip-228.md Co-authored-by: Lewis --- KIPs/kip-228.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KIPs/kip-228.md b/KIPs/kip-228.md index d86311d..598bd96 100644 --- a/KIPs/kip-228.md +++ b/KIPs/kip-228.md @@ -1,5 +1,5 @@ --- -kip: KIP-228 +kip: 228 title: SetCode for EOA author: Ollie (@blukat29), Garry (@Mdaiki0730), Shiki (@shiki-tak) discussions-to: TBD From cb1ffbad6a30d21f756b66902b428a4b0b18a41b Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Tue, 26 Nov 2024 14:14:50 +0700 Subject: [PATCH 21/30] add step build to test code --- .github/workflows/check-link.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index 37fe821..ccf8344 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -10,10 +10,17 @@ jobs: issues: write actions: write pull-requests: write + pages: read steps: - name: Checkout the code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 + with: + ruby-version: '3.1.4' + bundler-cache: true + cache-version: 0 - name: Link Checker id: lychee @@ -24,6 +31,14 @@ jobs: jobSummary: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll to test + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + # - name: Create Issue From File # uses: peter-evans/create-issue-from-file@v4 From 6487b52315b17e41bbdb92ba757f711a3cfefe37 Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Tue, 26 Nov 2024 14:17:04 +0700 Subject: [PATCH 22/30] add test on push direct --- .github/workflows/check-link.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index ccf8344..3592253 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -2,6 +2,9 @@ name: "Check Links in docs" on: pull_request: types: [opened, synchronize] + push: + branches: + - main jobs: linkChecker: From 66cc8c04901d47bf19d0cdee189b33394cca0a7b Mon Sep 17 00:00:00 2001 From: hyeonLewis Date: Tue, 26 Nov 2024 17:06:07 +0900 Subject: [PATCH 23/30] Fix wrong kip number --- KIPs/kip-226.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KIPs/kip-226.md b/KIPs/kip-226.md index 82e9737..0efaea0 100644 --- a/KIPs/kip-226.md +++ b/KIPs/kip-226.md @@ -1,5 +1,5 @@ --- -kip: KIP-226 +kip: 226 title: Consensus liquidity for Kaia author: Lewis (@hyeonLewis), Ian (@ian0371), Ollie (@blukat29), Lake (@hyunsooda), and Aidan (@aidan-kwon) discussions-to: TBD From f8a6df2a56bbddf3d87467cff9b8d4541b2104e8 Mon Sep 17 00:00:00 2001 From: Hyunsoo Shin Date: Wed, 27 Nov 2024 16:54:39 +0900 Subject: [PATCH 24/30] [KIP-223] Renamed --- KIPs/{kip-xx.md => kip-223.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename KIPs/{kip-xx.md => kip-223.md} (100%) diff --git a/KIPs/kip-xx.md b/KIPs/kip-223.md similarity index 100% rename from KIPs/kip-xx.md rename to KIPs/kip-223.md From c58a2fca120fe434fa10a6406a59df7fc066afb5 Mon Sep 17 00:00:00 2001 From: "ollie.j" Date: Thu, 5 Dec 2024 15:49:32 +0900 Subject: [PATCH 25/30] kip-228: SetCodeTx updates CodeInfo as well --- KIPs/kip-228.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/KIPs/kip-228.md b/KIPs/kip-228.md index 598bd96..1931bb6 100644 --- a/KIPs/kip-228.md +++ b/KIPs/kip-228.md @@ -44,10 +44,15 @@ Its consensus type prefix (that affects `block.transactionRoot`) is `ENVELOPED_S #### Behavior -The transaction’s behavior follows that of EIP-7702 except for the following: - -- For each authorization tuple `[chain_id, address, nonce, y_parity, r, s]`, fetch the AccountKey field of the recovered authority account. -- Verify that the AccountKey is of type `AccountKeyTypeLegacy`. If verification fails, immediately stop processing the tuple and continue to the next tuple in the list. +The transaction’s behavior follows that of [EIP-7702](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md) except for the following: + +For each authorization tuple `[chain_id, address, nonce, y_parity, r, s]`, +- After recovering the authority, + - Fetch the AccountKey field of the recovered authority account. + - Verify that the AccountKey is of type `AccountKeyTypeLegacy`. If verification fails, immediately stop processing the tuple and continue to the next tuple in the list. +- When setting the code of the authority, + - Also set its codeInfo to `0x11 (VmVersion1 & EVM)` + - As a special case, if address is `0x0000000000000000000000000000000000000000`, reset the authority account's codeInfo to `0x00`. #### Delegation Designation From 73bac01909f67963cf4ef8986c93f0b562f504dc Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Tue, 26 Nov 2024 14:14:50 +0700 Subject: [PATCH 26/30] add step build to test code --- .github/workflows/check-link.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index 37fe821..ccf8344 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -10,10 +10,17 @@ jobs: issues: write actions: write pull-requests: write + pages: read steps: - name: Checkout the code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 + with: + ruby-version: '3.1.4' + bundler-cache: true + cache-version: 0 - name: Link Checker id: lychee @@ -24,6 +31,14 @@ jobs: jobSummary: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll to test + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + # - name: Create Issue From File # uses: peter-evans/create-issue-from-file@v4 From 2ee72c87e3b8e2f470c0b9373717f70fdae50e01 Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Tue, 26 Nov 2024 14:17:04 +0700 Subject: [PATCH 27/30] add test on push direct --- .github/workflows/check-link.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index ccf8344..3592253 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -2,6 +2,9 @@ name: "Check Links in docs" on: pull_request: types: [opened, synchronize] + push: + branches: + - main jobs: linkChecker: From 0fdeba375cc65b1c7d9d7344a96c5f3d6c2732b1 Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Fri, 6 Dec 2024 14:05:27 +0700 Subject: [PATCH 28/30] update pages --- .github/workflows/check-link.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index 3592253..4946cde 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -38,7 +38,7 @@ jobs: id: pages uses: actions/configure-pages@v5 - name: Build with Jekyll to test - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + run: bundle exec jekyll build --baseurl "/kips" env: JEKYLL_ENV: production From 4b8f985ed38b6893253aff0f4ef86d2bef69454f Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Fri, 6 Dec 2024 14:17:49 +0700 Subject: [PATCH 29/30] update pages folder --- .github/workflows/check-link.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index 4946cde..f612afd 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -38,7 +38,7 @@ jobs: id: pages uses: actions/configure-pages@v5 - name: Build with Jekyll to test - run: bundle exec jekyll build --baseurl "/kips" + run: bundle exec jekyll build --baseurl "./kips" env: JEKYLL_ENV: production From 901839d3d09675421504368f7fe999085f5f5d94 Mon Sep 17 00:00:00 2001 From: Sotatek-TinnNguyen Date: Fri, 6 Dec 2024 14:43:37 +0700 Subject: [PATCH 30/30] update pages folder --- .github/workflows/check-link.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index f612afd..955280d 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -14,6 +14,8 @@ jobs: actions: write pull-requests: write pages: read + contents: read + id-token: write steps: - name: Checkout the code @@ -38,7 +40,7 @@ jobs: id: pages uses: actions/configure-pages@v5 - name: Build with Jekyll to test - run: bundle exec jekyll build --baseurl "./kips" + run: bundle exec jekyll build --baseurl "/kips" env: JEKYLL_ENV: production