Skip to content

Commit fc26a57

Browse files
areakronosapiens
authored andcommitted
Update smoke test storage hashes
This branch has added extra functions to IColony, which as discussed in #644 means these variables need updating.
1 parent 9b4f9e3 commit fc26a57

4 files changed

Lines changed: 98 additions & 61 deletions

File tree

docs/_Interface_IColony.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,19 @@ Deobligate the user some amount of tokens, releasing the stake.
206206
|_amount|uint256|Amount of internal token we are deobligating.
207207

208208

209+
### `deprecateExtension`
210+
211+
Upgrade an extension in a colony. Secured function to authorised members.
212+
213+
214+
**Parameters**
215+
216+
|Name|Type|Description|
217+
|---|---|---|
218+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
219+
|deprecated|bool|Whether to deprecate the extension or not
220+
221+
209222
### `emitDomainReputationPenalty`
210223

211224
Emit a negative domain reputation update. Available only to Arbitration role holders
@@ -881,6 +894,19 @@ Called once when the colony is created to initialise certain storage slot values
881894
|_token|address|Address of the colony ERC20 Token
882895

883896

897+
### `installExtension`
898+
899+
Install an extension to the colony. Secured function to authorised members.
900+
901+
902+
**Parameters**
903+
904+
|Name|Type|Description|
905+
|---|---|---|
906+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
907+
|version|uint256|The new extension version to install
908+
909+
884910
### `makeExpenditure`
885911

886912
Add a new expenditure in the colony. Secured function to authorised members.
@@ -1536,6 +1562,18 @@ Transfer some amount of obligated tokens. Can be called by the arbitration role.
15361562
|_recipient|address|Recipient of the transferred tokens.
15371563

15381564

1565+
### `uninstallExtension`
1566+
1567+
Uninstall an extension from a colony. Secured function to authorised members.
1568+
1569+
1570+
**Parameters**
1571+
1572+
|Name|Type|Description|
1573+
|---|---|---|
1574+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
1575+
1576+
15391577
### `updateColonyOrbitDB`
15401578

15411579
Update a colony's orbitdb address. Can only be called by a colony with a registered subdomain
@@ -1561,6 +1599,19 @@ Upgrades a colony to a new Colony contract version `_newVersion`.
15611599
|_newVersion|uint|The target version for the upgrade
15621600

15631601

1602+
### `upgradeExtension`
1603+
1604+
Upgrade an extension in a colony. Secured function to authorised members.
1605+
1606+
1607+
**Parameters**
1608+
1609+
|Name|Type|Description|
1610+
|---|---|---|
1611+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
1612+
|newVersion|uint256|The version to upgrade to (must be one larger than the current version)
1613+
1614+
15641615
### `userCanSetRoles`
15651616

15661617
Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions

docs/_Interface_IColonyNetwork.md

Lines changed: 44 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ Adds a new Colony contract version and the address of associated `_resolver` con
2222

2323
### `addExtension`
2424

25-
Add a new extension/version to the Extensions repository.
25+
Add a new extension resolver to the Extensions repository.
2626

27-
*Note: The extension version is queried from the resolver itself.*
27+
*Note: Can only be called by the MetaColony.*
2828

2929
**Parameters**
3030

3131
|Name|Type|Description|
3232
|---|---|---|
3333
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
3434
|resolver|address|The deployed resolver containing the extension contract logic
35-
|roles|bytes32|A bytes array containing the roles required by the extension
3635

3736

3837
### `addr`
@@ -131,18 +130,15 @@ Used by a user to claim any mining rewards due to them. This will place them in
131130

132131
### `createColony`
133132

134-
Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options
133+
Creates a new colony in the network, at version 3
135134

136-
*Note: For the colony to mint tokens, token ownership must be transferred to the new colony*
135+
*Note: This is now deprecated and will be removed in a future version*
137136

138137
**Parameters**
139138

140139
|Name|Type|Description|
141140
|---|---|---|
142-
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token
143-
|_version|uint256|The version of colony to deploy (pass 0 for the current version)
144-
|_colonyName|string|The label to register (if null, no label is registered)
145-
|_orbitdb|string|The path of the orbitDB database associated with the user profile
141+
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token.
146142

147143
**Return Parameters**
148144

@@ -152,15 +148,17 @@ Overload of the simpler `createColony` -- creates a new colony in the network wi
152148

153149
### `createColony`
154150

155-
Creates a new colony in the network, at version 3
151+
Creates a new colony in the network, with an optional ENS name
156152

157-
*Note: This is now deprecated and will be removed in a future version*
153+
*Note: For the colony to mint tokens, token ownership must be transferred to the new colony*
158154

159155
**Parameters**
160156

161157
|Name|Type|Description|
162158
|---|---|---|
163-
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token.
159+
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token
160+
|_version|uint256|The version of colony to deploy (pass 0 for the current version)
161+
|_colonyName|string|The label to register (if null, no label is registered)
164162

165163
**Return Parameters**
166164

@@ -170,7 +168,7 @@ Creates a new colony in the network, at version 3
170168

171169
### `createColony`
172170

173-
Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options
171+
Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4
174172

175173
*Note: This is now deprecated and will be removed in a future version*
176174

@@ -181,7 +179,7 @@ Overload of the simpler `createColony` -- creates a new colony in the network wi
181179
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token
182180
|_version|uint256|The version of colony to deploy (pass 0 for the current version)
183181
|_colonyName|string|The label to register (if null, no label is registered)
184-
|_orbitdb|string|The path of the orbitDB database associated with the user profile
182+
|_orbitdb|string|DEPRECATED Currently a no-op
185183
|_useExtensionManager|bool|DEPRECATED Currently a no-op
186184

187185
**Return Parameters**
@@ -202,6 +200,19 @@ Create the Meta Colony, same as a normal colony plus the root skill.
202200
|_tokenAddress|address|Address of the CLNY token
203201

204202

203+
### `deprecateExtension`
204+
205+
Deprecate an extension in a colony. Can only be called by a Colony.
206+
207+
208+
**Parameters**
209+
210+
|Name|Type|Description|
211+
|---|---|---|
212+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
213+
|deprecated|bool|Whether to deprecate the extension or not
214+
215+
205216
### `deprecateSkill`
206217

207218
Mark a global skill as deprecated which stops new tasks and payments from using it.
@@ -316,56 +327,39 @@ Returns the address of the ENSRegistrar for the Network.
316327

317328
### `getExtensionInstallation`
318329

319-
330+
Get an extension's installation.
320331

321332

322333
**Parameters**
323334

324335
|Name|Type|Description|
325336
|---|---|---|
326-
|extensionId|bytes32|
327-
|colony|address|
337+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
338+
|colony|address|Address of the colony the extension is installed in
328339

329340
**Return Parameters**
330341

331342
|Name|Type|Description|
332343
|---|---|---|
333-
|address|address|
344+
|installation|address|The address of the installed extension
334345

335346
### `getExtensionResolver`
336347

337-
348+
Get an extension's resolver.
338349

339350

340351
**Parameters**
341352

342353
|Name|Type|Description|
343354
|---|---|---|
344-
|extensionId|bytes32|
345-
|version|uint256|
346-
347-
**Return Parameters**
348-
349-
|Name|Type|Description|
350-
|---|---|---|
351-
|address|address|
352-
353-
### `getExtensionRoles`
354-
355-
356-
357-
358-
**Parameters**
359-
360-
|Name|Type|Description|
361-
|---|---|---|
362-
|extensionId|bytes32|
355+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
356+
|version|uint256|Version of the extension
363357

364358
**Return Parameters**
365359

366360
|Name|Type|Description|
367361
|---|---|---|
368-
|bytes32|bytes32|
362+
|resolver|address|The address of the deployed resolver
369363

370364
### `getFeeInverse`
371365

@@ -633,16 +627,15 @@ Creates initial inactive reputation mining cycle.
633627

634628
### `installExtension`
635629

636-
630+
Install an extension in a colony. Can only be called by a Colony.
637631

638632

639633
**Parameters**
640634

641635
|Name|Type|Description|
642636
|---|---|---|
643-
|extensionId|bytes32|
644-
|version|uint256|
645-
|colony|address|
637+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
638+
|version|uint256|Version of the extension to install
646639

647640

648641
### `isColony`
@@ -812,7 +805,7 @@ Called to set the total per-cycle reputation reward, which will be split between
812805

813806
### `setReputationRootHash`
814807

815-
Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract.
808+
This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter.
816809

817810

818811
**Parameters**
@@ -822,11 +815,12 @@ Set a new Reputation root hash and starts a new mining cycle. Can only be called
822815
|newHash|bytes32|The reputation root hash
823816
|newNLeaves|uint256|The updated leaves count value
824817
|stakers|address[]|Array of users who submitted or backed the hash, being accepted here as the new reputation root hash
818+
|reward|uint256|Amount of CLNY to be distributed as reward to miners (not used)
825819

826820

827821
### `setReputationRootHash`
828822

829-
This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter.
823+
Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract.
830824

831825

832826
**Parameters**
@@ -836,7 +830,6 @@ This version of setReputationRootHash is deprecated and will be removed in a fut
836830
|newHash|bytes32|The reputation root hash
837831
|newNLeaves|uint256|The updated leaves count value
838832
|stakers|address[]|Array of users who submitted or backed the hash, being accepted here as the new reputation root hash
839-
|reward|uint256|Amount of CLNY to be distributed as reward to miners (not used)
840833

841834

842835
### `setTokenLocking`
@@ -915,15 +908,14 @@ Query if a contract implements an interface
915908

916909
### `uninstallExtension`
917910

918-
911+
Uninstall an extension in a colony. Can only be called by a Colony.
919912

920913

921914
**Parameters**
922915

923916
|Name|Type|Description|
924917
|---|---|---|
925-
|extensionId|bytes32|
926-
|colony|address|
918+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
927919

928920

929921
### `unstakeForMining`
@@ -964,13 +956,12 @@ Update a user's orbitdb address. Can only be called by a user with a registered
964956

965957
### `upgradeExtension`
966958

967-
959+
Upgrade an extension in a colony. Can only be called by a Colony.
968960

969961

970962
**Parameters**
971963

972964
|Name|Type|Description|
973965
|---|---|---|
974-
|extensionId|bytes32|
975-
|colony|address|
976-
|newVersion|uint256|
966+
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
967+
|newVersion|uint256|Version of the extension to upgrade to (must be one greater than current)

docs/_Interface_IMetaColony.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Add a new extension/version to the Extensions repository.
1919
|---|---|---|
2020
|_extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
2121
|_resolver|address|The deployed resolver containing the extension contract logic
22-
|_roles|bytes32|A byte array containing the roles required by the extension
2322

2423

2524
### `addGlobalSkill`

test-smoke/colony-storage-consistent.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,11 @@ contract("Contract Storage", (accounts) => {
153153
console.log("miningCycleStateHash:", miningCycleAccount.stateRoot.toString("hex"));
154154
console.log("tokenLockingStateHash:", tokenLockingAccount.stateRoot.toString("hex"));
155155

156-
expect(colonyNetworkAccount.stateRoot.toString("hex")).to.equal("4795c6cf36580719d2b3122e8a2d314024e5eb67ef0925dc35c5bbbcb26e20c9");
157-
156+
expect(colonyNetworkAccount.stateRoot.toString("hex")).to.equal("db135eb0f95ae2cc2ae50c14a5f66ee497646024feedcd1f87cc013068989d4a");
158157
expect(colonyAccount.stateRoot.toString("hex")).to.equal("8de351231d2738f6d6f3a680e986461029afb48b1638e06a40b07e70604dab66");
159-
160158
expect(metaColonyAccount.stateRoot.toString("hex")).to.equal("867fa1b5d2ada64ae601031e0654f9b2d7a1cc024493fac71e13ef91fb862119");
161-
162-
expect(miningCycleAccount.stateRoot.toString("hex")).to.equal("47ed02166271709fee6816f42d511e3d0c56e4ee5fc1f2e24c5f05a3954d0292");
163-
164-
expect(tokenLockingAccount.stateRoot.toString("hex")).to.equal("97a15b06a12c2300869568a1b32f6f60c9b87d0102ee5de7f52290b49c0eb891");
159+
expect(miningCycleAccount.stateRoot.toString("hex")).to.equal("6e06f76ad3caff1649fad8e2ae3f42eef7bb9c55dab13e6514d45ec65864993f");
160+
expect(tokenLockingAccount.stateRoot.toString("hex")).to.equal("27ec15478ee91943b5d98205085f20fa7255f4b77747931fbf488c5d0d0bfbaa");
165161
});
166162
});
167163
});

0 commit comments

Comments
 (0)