@inco/lightning 0.8.0-devnet-7 → 0.8.0-devnet-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest.yaml +22 -0
- package/package.json +1 -1
- package/src/CreateXHelper.sol +1 -1
- package/src/IncoLightning.sol +20 -7
- package/src/IncoVerifier.sol +1 -1
- package/src/Lib.devnet.sol +1 -1
- package/src/Lib.sol +1 -1
- package/src/interfaces/IIncoLightning.sol +4 -0
- package/src/interfaces/automata-interfaces/BELE.sol +1 -1
- package/src/interfaces/automata-interfaces/IPCCSRouter.sol +1 -1
- package/src/interfaces/automata-interfaces/IPcsDao.sol +1 -1
- package/src/interfaces/automata-interfaces/IQuoteVerifier.sol +1 -1
- package/src/interfaces/automata-interfaces/Types.sol +1 -1
- package/src/libs/incoLightning_devnet_v5_203964628.sol +942 -0
- package/src/lightning-parts/AccessControl/AdvancedAccessControl.sol +4 -0
- package/src/lightning-parts/AccessControl/test/TestAdvancedAccessControl.t.sol +15 -0
- package/src/lightning-parts/EncryptedInput.sol +60 -5
- package/src/lightning-parts/TEELifecycle.sol +37 -29
- package/src/lightning-parts/TEELifecycle.types.sol +1 -1
- package/src/lightning-parts/interfaces/IEncryptedInput.sol +6 -0
- package/src/lightning-parts/interfaces/ITEELifecycle.sol +1 -1
- package/src/lightning-parts/primitives/HandleGeneration.sol +2 -2
- package/src/lightning-parts/primitives/test/SignatureVerifier.t.sol +1 -1
- package/src/lightning-parts/test/HandleMetadata.t.sol +59 -9
- package/src/pasted-dependencies/ICreateX.sol +1 -1
- package/src/periphery/SessionVerifier.sol +4 -4
- package/src/shared/IOwnable.sol +1 -1
- package/src/shared/IUUPSUpgradable.sol +1 -1
- package/src/test/FakeIncoInfra/FakeIncoInfraBase.sol +3 -3
- package/src/test/FakeIncoInfra/MockRemoteAttestation.sol +2 -1
- package/src/test/TEELifecycle/TEELifecycleMockTest.t.sol +82 -57
- package/src/test/TestDeploy.t.sol +28 -0
- package/src/test/TestUpgrade.t.sol +1 -1
- package/src/version/IncoLightningConfig.sol +1 -1
package/manifest.yaml
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
incoLightning_devnet_v5_203964628:
|
|
2
|
+
executor:
|
|
3
|
+
name: incoLightning_devnet_v5_203964628
|
|
4
|
+
majorVersion: 5
|
|
5
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
6
|
+
pepper: devnet
|
|
7
|
+
executorAddress: "0x8D5D75CC00E2Fc84ec4dE085aE1708223591c6b6"
|
|
8
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00c573fb2bf617e75b6210d4"
|
|
9
|
+
deployments:
|
|
10
|
+
- name: incoLightningPreview_5_0_0__203964628
|
|
11
|
+
chainId: "84532"
|
|
12
|
+
chainName: Base Sepolia
|
|
13
|
+
version:
|
|
14
|
+
major: 5
|
|
15
|
+
minor: 0
|
|
16
|
+
patch: 0
|
|
17
|
+
shortSalt: "203964628"
|
|
18
|
+
blockNumber: "37431152"
|
|
19
|
+
deployDate: 2026-02-09T09:49:55.326Z
|
|
20
|
+
commit: v0.8.0-devnet-8-8-ge2e37e00
|
|
21
|
+
active: true
|
|
22
|
+
includesPreviewFeatures: true
|
|
1
23
|
incoLightning_devnet_v4_409204766:
|
|
2
24
|
executor:
|
|
3
25
|
name: incoLightning_devnet_v4_409204766
|
package/package.json
CHANGED
package/src/CreateXHelper.sol
CHANGED
package/src/IncoLightning.sol
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: No License
|
|
2
|
-
pragma solidity ^0.8;
|
|
2
|
+
pragma solidity ^0.8.29;
|
|
3
3
|
|
|
4
4
|
import {IIncoLightning} from "./interfaces/IIncoLightning.sol";
|
|
5
5
|
import {CONTRACT_NAME, MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION} from "./version/IncoLightningConfig.sol";
|
|
@@ -35,10 +35,10 @@ contract IncoLightning is
|
|
|
35
35
|
/// @notice Initializes the IncoLightning contract with deployment configuration
|
|
36
36
|
/// @dev The salt embeds the deployer address, contract name, version, and pepper for deterministic deployment.
|
|
37
37
|
/// This constructor is called once during proxy implementation deployment.
|
|
38
|
-
/// @param
|
|
38
|
+
/// @param _salt Unique salt used for deterministic deployment via CreateX
|
|
39
39
|
/// @param _incoVerifier The verifier contract address for attestation validation
|
|
40
|
-
constructor(bytes32
|
|
41
|
-
Version(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION,
|
|
40
|
+
constructor(bytes32 _salt, IIncoVerifier _incoVerifier)
|
|
41
|
+
Version(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, _salt, CONTRACT_NAME)
|
|
42
42
|
VerifierAddressGetter(address(_incoVerifier))
|
|
43
43
|
{}
|
|
44
44
|
|
|
@@ -51,9 +51,10 @@ contract IncoLightning is
|
|
|
51
51
|
/// @notice Initializes the proxy with an owner address
|
|
52
52
|
/// @dev Must be called immediately after proxy deployment. Can only be called once.
|
|
53
53
|
/// This sets up the Ownable state for the proxy instance.
|
|
54
|
-
/// @param
|
|
55
|
-
function initialize(address
|
|
56
|
-
__Ownable_init(
|
|
54
|
+
/// @param _owner The address that will own this contract and can authorize upgrades
|
|
55
|
+
function initialize(address _owner) public initializer {
|
|
56
|
+
__Ownable_init(_owner);
|
|
57
|
+
_setAcceptedVersion(2, true);
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
/// @notice Withdraws accumulated protocol fees to the owner
|
|
@@ -63,6 +64,18 @@ contract IncoLightning is
|
|
|
63
64
|
_withdrawFeesTo(owner());
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
/// @notice Adds a version to the accepted input versions whitelist.
|
|
68
|
+
/// @param version The version number to accept (must be non-negative).
|
|
69
|
+
function addAcceptedVersion(uint16 version) external onlyOwner {
|
|
70
|
+
_setAcceptedVersion(version, true);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/// @notice Removes a version from the accepted input versions whitelist.
|
|
74
|
+
/// @param version The version number to remove.
|
|
75
|
+
function removeAcceptedVersion(uint16 version) external onlyOwner {
|
|
76
|
+
_setAcceptedVersion(version, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
66
79
|
/// @notice Required for CreateX deterministic deployment
|
|
67
80
|
/// @dev Empty fallback allows the contract to be deployed via CreateX's create2 mechanism
|
|
68
81
|
fallback() external {}
|
package/src/IncoVerifier.sol
CHANGED
package/src/Lib.devnet.sol
CHANGED
|
@@ -9,7 +9,7 @@ import { IncoLightning } from "./IncoLightning.sol";
|
|
|
9
9
|
import { ebool, euint256, eaddress, ETypes } from "./Types.sol";
|
|
10
10
|
import { DecryptionAttestation } from "./lightning-parts/DecryptionAttester.types.sol";
|
|
11
11
|
|
|
12
|
-
IncoLightning constant inco = IncoLightning(
|
|
12
|
+
IncoLightning constant inco = IncoLightning(0x8D5D75CC00E2Fc84ec4dE085aE1708223591c6b6);
|
|
13
13
|
address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
|
|
14
14
|
|
|
15
15
|
/// @notice Returns the ETypes enum value encoded in a handle
|
package/src/Lib.sol
CHANGED
|
@@ -9,7 +9,7 @@ import { IncoLightning } from "./IncoLightning.sol";
|
|
|
9
9
|
import { ebool, euint256, eaddress, ETypes } from "./Types.sol";
|
|
10
10
|
import { DecryptionAttestation } from "./lightning-parts/DecryptionAttester.types.sol";
|
|
11
11
|
|
|
12
|
-
IncoLightning constant inco = IncoLightning(
|
|
12
|
+
IncoLightning constant inco = IncoLightning(0x8D5D75CC00E2Fc84ec4dE085aE1708223591c6b6);
|
|
13
13
|
address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
|
|
14
14
|
|
|
15
15
|
/// @notice Returns the ETypes enum value encoded in a handle
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.8
|
|
2
|
+
pragma solidity ^0.8;
|
|
3
3
|
|
|
4
4
|
// https://github.com/intel/SGXDataCenterAttestationPrimitives/blob/e7604e02331b3377f3766ed3653250e03af72d45/QuoteVerification/QVL/Src/AttestationLibrary/src/CertVerification/X509Constants.h#L64
|
|
5
5
|
uint256 constant TCB_CPUSVN_SIZE = 16;
|