@inco/lightning 0.1.20
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/CHANGELOG.md +39 -0
- package/README.md +69 -0
- package/dumps/incoLightning_0_1_23__547622051.dump.json +1 -0
- package/dumps/incoLightning_0_1_23__547622051.env +15 -0
- package/dumps/incoLightning_0_1_23__830342853.dump.json +1 -0
- package/dumps/incoLightning_0_1_23__830342853.env +15 -0
- package/dumps/incoLightning_0_1_24__266705097.dump.json +1 -0
- package/dumps/incoLightning_0_1_24__266705097.env +15 -0
- package/dumps/incoLightning_0_1_25__986372984.dump.json +1 -0
- package/dumps/incoLightning_0_1_25__986372984.env +15 -0
- package/foundry.toml +20 -0
- package/package.json +27 -0
- package/remappings.txt +4 -0
- package/src/DeployUtils.sol +109 -0
- package/src/IncoLightning.sol +45 -0
- package/src/Lib.sol +389 -0
- package/src/Lib.template.sol +464 -0
- package/src/Types.sol +74 -0
- package/src/libs/incoLightning_0_1_22__761766708.sol +389 -0
- package/src/libs/incoLightning_0_1_23__547622051.sol +389 -0
- package/src/libs/incoLightning_0_1_23__830342853.sol +389 -0
- package/src/libs/incoLightning_0_1_24__266705097.sol +389 -0
- package/src/libs/incoLightning_0_1_25__986372984.sol +389 -0
- package/src/lightning-parts/AccessControl/BaseAccessControlList.sol +105 -0
- package/src/lightning-parts/AccessControl/test/TestBaseAccessControl.t.sol +12 -0
- package/src/lightning-parts/DecryptionHandler.sol +164 -0
- package/src/lightning-parts/EncryptedInput.sol +61 -0
- package/src/lightning-parts/EncryptedOperations.sol +610 -0
- package/src/lightning-parts/TrivialEncryption.sol +43 -0
- package/src/lightning-parts/primitives/EventCounter.sol +32 -0
- package/src/lightning-parts/primitives/HandleGeneration.sol +107 -0
- package/src/lightning-parts/primitives/HandleMetadata.sol +38 -0
- package/src/lightning-parts/primitives/SignatureVerifier.sol +47 -0
- package/src/lightning-parts/test/HandleMetadata.t.sol +87 -0
- package/src/pasted-dependencies/CreateX.sol +1293 -0
- package/src/pasted-dependencies/ICreateX.sol +187 -0
- package/src/test/AddTwo.sol +48 -0
- package/src/test/FakeIncoInfra/FakeComputeServer.sol +137 -0
- package/src/test/FakeIncoInfra/FakeIncoInfraBase.sol +77 -0
- package/src/test/FakeIncoInfra/KVStore.sol +35 -0
- package/src/test/FakeIncoInfra/MockOpHandler.sol +140 -0
- package/src/test/FakeIncoInfra/getOpForSelector.sol +71 -0
- package/src/test/IncoTest.sol +48 -0
- package/src/test/TestAddTwo.t.sol +31 -0
- package/src/test/TestDeploy.t.sol +39 -0
- package/src/test/TestExtractDataOfEventTooLarge.t.sol +43 -0
- package/src/test/TestFakeInfra.t.sol +301 -0
- package/src/test/TestVersion.t.sol +36 -0
- package/src/version/IncoLightningConfig.sol +13 -0
- package/src/version/Version.sol +76 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.20
|
|
4
|
+
|
|
5
|
+
- Bug fix in EIP712 signature verification in Advanced ACL. [#485](https://github.com/Inco-fhevm/inco-monorepo/pull/485)
|
|
6
|
+
|
|
7
|
+
Note: version 0.1.18 and 0.1.19 are unused, and were part of testing purposes only.
|
|
8
|
+
|
|
9
|
+
## 0.1.17
|
|
10
|
+
|
|
11
|
+
- Add deployment of `SessionVerifier` as part of the IncoLite deployment.
|
|
12
|
+
|
|
13
|
+
## 0.1.16
|
|
14
|
+
|
|
15
|
+
- Added missing arithemetic, bitwise, and random operations to IncoLib
|
|
16
|
+
|
|
17
|
+
## 0.1.15
|
|
18
|
+
|
|
19
|
+
- Same deployment as 0.1.13, but deployed across both Base Sepolia and Monad Testnet.
|
|
20
|
+
|
|
21
|
+
## 0.1.14
|
|
22
|
+
|
|
23
|
+
- **This deployment is a test deployment, and should not be used.** [#378](https://github.com/Inco-fhevm/inco-monorepo/pull/378) Test the new multi-chain deployments. No changes over 0.1.13.
|
|
24
|
+
|
|
25
|
+
## 0.1.13
|
|
26
|
+
|
|
27
|
+
"Advanced" access control first iteration, provides a way for accounts (EOAs / Smart Wallets / Contracts) to share their read access to handles with arbitrary logic using onchain or offchain signatures
|
|
28
|
+
|
|
29
|
+
## 0.1.10
|
|
30
|
+
|
|
31
|
+
- Update contract deployment logic to include ECIES public key and also to set the callback signer address on deployed contracts
|
|
32
|
+
|
|
33
|
+
## 0.1.2
|
|
34
|
+
|
|
35
|
+
Type embedding in handle after trivial encrypts and operations is consistent with zama
|
|
36
|
+
|
|
37
|
+
## 0.1.1
|
|
38
|
+
|
|
39
|
+
Embed type into every handle. Check handle type on every op.
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Inco lite
|
|
2
|
+
|
|
3
|
+
## Install dependencies
|
|
4
|
+
|
|
5
|
+
`bun install`
|
|
6
|
+
|
|
7
|
+
## Build
|
|
8
|
+
|
|
9
|
+
Use [forge](https://book.getfoundry.sh/getting-started/installation) version 1.0 or higher
|
|
10
|
+
|
|
11
|
+
`forge build`
|
|
12
|
+
|
|
13
|
+
## Deploy
|
|
14
|
+
|
|
15
|
+
### One-time key import
|
|
16
|
+
|
|
17
|
+
1. Import key into Foundry cast wallet using [`make import_sepolia_deployer`](./Makefile)
|
|
18
|
+
|
|
19
|
+
### Deploy new IncoLite contracts
|
|
20
|
+
|
|
21
|
+
Targest for deploying the contracts are in the [Makefile](./Makefile). There are separate targtes for each chain and a target that deploys to all of them.
|
|
22
|
+
|
|
23
|
+
The version of the contracts that will be deployed is defined by the current working directory and it will be deployed to an address that is deterministically calculated based on:
|
|
24
|
+
|
|
25
|
+
- The contract name
|
|
26
|
+
- The contract version
|
|
27
|
+
- The deployer address
|
|
28
|
+
- An optional deploy-time 'pepper'
|
|
29
|
+
|
|
30
|
+
The contract name and version are constants in [IncoLightningConfig.sol](./src/version/IncoLightningConfig.sol) and the deployer address is the address of the wallet that is used to deploy the contracts. The optional deploy-time 'pepper' is a deployment-time string that can be chosen to alter the contract address for each deployment in the case where you what to differentiate a deployment from others.
|
|
31
|
+
|
|
32
|
+
The point of the deterministic address is that holding the values above constant we can obtain a consistent canonical deployment address across all chains.
|
|
33
|
+
|
|
34
|
+
#### Deployment process
|
|
35
|
+
|
|
36
|
+
1. Bump IncoLite version in [IncoLightningConfig.sol](./src/version/IncoLightningConfig.sol)
|
|
37
|
+
2. Run [`make deploy_multichain`](./Makefile) - this will update the manifest with the new release
|
|
38
|
+
3. Run [`make deploy_test_contracts_multichain`](./Makefile)
|
|
39
|
+
|
|
40
|
+
##### Providing a pepper
|
|
41
|
+
|
|
42
|
+
If you want to provide a pepper then use `make deploy_multichain INCO_LITE_PEPPER=<pepper>` where `pepper` is the string you want to use. This will be used to calculate the contract address and will be included in the manifest.
|
|
43
|
+
|
|
44
|
+
## Defining a release without explicit deployment
|
|
45
|
+
|
|
46
|
+
The deployment machinery is currently in a halfway house whereby we capture releases at the same time as performing smart contract deployments locally. In the future we expect the contract deployment (and later upgrade) processes to be run by CI or a by a covalidator initialisation container. At that point rather than the manifest being an artefact of record it will be a declaration of intent. At the moment it serves both purposes, but will be refactored to remove the deployment log capture element.
|
|
47
|
+
|
|
48
|
+
With a nod to the future we provide the `make release` target which performs a simulated deploy, updates the manifest with a dummy deployment, and declares a release.
|
|
49
|
+
|
|
50
|
+
## Deploy NPM modules
|
|
51
|
+
|
|
52
|
+
1. Bump contracts NPM version in [package.json](./package.json)
|
|
53
|
+
2. Bump JS NPM version in [package.json](../js/package.json)
|
|
54
|
+
3. Publish contracts `npm publish:github`
|
|
55
|
+
4. Build JS [`make build`](../js/Makefile) (depends on contract deployment being done first)
|
|
56
|
+
5. Publish js `npm publish:github`
|
|
57
|
+
|
|
58
|
+
## Build covalidator docker images
|
|
59
|
+
|
|
60
|
+
1. PR to main
|
|
61
|
+
2. Manually grab hash from dockerhub which is also `git describe --tags --always --dirty`
|
|
62
|
+
|
|
63
|
+
## Update denver multi-chain testnet
|
|
64
|
+
|
|
65
|
+
1. Copy docker tag into [Pulumi.multichain.yaml](../../infraco/pkg/denver/Pulumi.multichain.yaml)
|
|
66
|
+
2. Consider whether to cobber `requestConter.txt` and `lastBlock.txt` depending on the type of update:
|
|
67
|
+
- If updating a covalidator to an existing contract use `--no-clobber`
|
|
68
|
+
- If updating a covalidator to a new contract omit `--no-clobber`
|
|
69
|
+
3. Run `pulumi up`
|