@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.
Files changed (34) hide show
  1. package/manifest.yaml +22 -0
  2. package/package.json +1 -1
  3. package/src/CreateXHelper.sol +1 -1
  4. package/src/IncoLightning.sol +20 -7
  5. package/src/IncoVerifier.sol +1 -1
  6. package/src/Lib.devnet.sol +1 -1
  7. package/src/Lib.sol +1 -1
  8. package/src/interfaces/IIncoLightning.sol +4 -0
  9. package/src/interfaces/automata-interfaces/BELE.sol +1 -1
  10. package/src/interfaces/automata-interfaces/IPCCSRouter.sol +1 -1
  11. package/src/interfaces/automata-interfaces/IPcsDao.sol +1 -1
  12. package/src/interfaces/automata-interfaces/IQuoteVerifier.sol +1 -1
  13. package/src/interfaces/automata-interfaces/Types.sol +1 -1
  14. package/src/libs/incoLightning_devnet_v5_203964628.sol +942 -0
  15. package/src/lightning-parts/AccessControl/AdvancedAccessControl.sol +4 -0
  16. package/src/lightning-parts/AccessControl/test/TestAdvancedAccessControl.t.sol +15 -0
  17. package/src/lightning-parts/EncryptedInput.sol +60 -5
  18. package/src/lightning-parts/TEELifecycle.sol +37 -29
  19. package/src/lightning-parts/TEELifecycle.types.sol +1 -1
  20. package/src/lightning-parts/interfaces/IEncryptedInput.sol +6 -0
  21. package/src/lightning-parts/interfaces/ITEELifecycle.sol +1 -1
  22. package/src/lightning-parts/primitives/HandleGeneration.sol +2 -2
  23. package/src/lightning-parts/primitives/test/SignatureVerifier.t.sol +1 -1
  24. package/src/lightning-parts/test/HandleMetadata.t.sol +59 -9
  25. package/src/pasted-dependencies/ICreateX.sol +1 -1
  26. package/src/periphery/SessionVerifier.sol +4 -4
  27. package/src/shared/IOwnable.sol +1 -1
  28. package/src/shared/IUUPSUpgradable.sol +1 -1
  29. package/src/test/FakeIncoInfra/FakeIncoInfraBase.sol +3 -3
  30. package/src/test/FakeIncoInfra/MockRemoteAttestation.sol +2 -1
  31. package/src/test/TEELifecycle/TEELifecycleMockTest.t.sol +82 -57
  32. package/src/test/TestDeploy.t.sol +28 -0
  33. package/src/test/TestUpgrade.t.sol +1 -1
  34. 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inco/lightning",
3
- "version": "0.8.0-devnet-7",
3
+ "version": "0.8.0-devnet-9",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "files": [
6
6
  "src/",
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: UNLICENSED
2
- pragma solidity ^0.8.10;
2
+ pragma solidity ^0.8;
3
3
 
4
4
  import {CreateX} from "./pasted-dependencies/CreateX.sol";
5
5
 
@@ -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 salt Unique salt used for deterministic deployment via CreateX
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 salt, IIncoVerifier _incoVerifier)
41
- Version(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, salt, CONTRACT_NAME)
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 owner The address that will own this contract and can authorize upgrades
55
- function initialize(address owner) public initializer {
56
- __Ownable_init(owner);
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 {}
@@ -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 {AdvancedAccessControl} from "./lightning-parts/AccessControl/AdvancedAccessControl.sol";
5
5
  import {DecryptionAttester} from "./lightning-parts/DecryptionAttester.sol";
@@ -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(0x4046b737B454b0430FBF29cea070e3337AdE95aD);
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(0x4046b737B454b0430FBF29cea070e3337AdE95aD);
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
@@ -21,4 +21,8 @@ interface IIncoLightning is
21
21
 
22
22
  function withdrawFees() external;
23
23
 
24
+ function addAcceptedVersion(uint16 version) external;
25
+
26
+ function removeAcceptedVersion(uint16 version) external;
27
+
24
28
  }
@@ -1,5 +1,5 @@
1
1
  //SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.0;
2
+ pragma solidity ^0.8;
3
3
 
4
4
  /**
5
5
  * @notice Converts a little-endian encoded bytes to a big-endian uint256 integer
@@ -1,5 +1,5 @@
1
1
  //SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity ^0.8;
3
3
 
4
4
  import {IdentityObj, EnclaveId, CA, TcbLevelsObj, TcbId, TdxModule, TdxModuleIdentity} from "./Types.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.0;
2
+ pragma solidity ^0.8;
3
3
 
4
4
  import {CA} from "./Types.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  //SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.0;
2
+ pragma solidity ^0.8;
3
3
 
4
4
  import {IPCCSRouter} from "./IPCCSRouter.sol";
5
5
  import {Header} from "./Types.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.0;
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;