Skip to content

Commit 6582e96

Browse files
authored
feat(sharing)!: Remove result proxy address from sharing contract config and matched deal (#438)
1 parent 5ab3947 commit 6582e96

File tree

13 files changed

+24
-38
lines changed

13 files changed

+24
-38
lines changed

.github/workflows/sharing-smart-contract-test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,16 @@ jobs:
8383
echo "Error: Anvil did not start within the timeout period."
8484
exit 1
8585
86-
- name: Hardhat Tests
86+
- name: Upgrade test
8787
working-directory: packages/sharing-smart-contract
88-
run: npm run test -- --network ci-bellecour-fork
88+
run: npm run upgrade-local-fork -- --network local-bellecour-fork
8989

90-
- name: Upgrade Test
90+
# TODO check why the CI does not fail when the following error occurs
91+
# (when the RPC node is not available):
92+
# 1) Uncaught error outside test suite
93+
- name: Hardhat tests
9194
working-directory: packages/sharing-smart-contract
92-
run: npm run upgrade-local-fork -- --network local-bellecour-fork
95+
run: npm run test -- --network local-bellecour-fork
9396

9497
- name: Set Directory Permissions
9598
working-directory: packages/sharing-smart-contract

environments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { getEnvironment } from "@iexec/dataprotector-environments";
2424
const {
2525
smsUrl,
2626
iexecGatewayUrl,
27-
resultProxyUrl,
27+
resultProxyUrl, // TODO remove
2828
ipfsGatewayUrl,
2929
ipfsNodeUrl,
3030
workerpoolProdAddress,

environments/common/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const KNOWN_KEYS = [
66
// iexec protocol config
77
"smsUrl",
88
"iexecGatewayUrl",
9-
"resultProxyUrl",
9+
"resultProxyUrl", // TODO remove
1010
"ipfsGatewayUrl",
1111
"ipfsNodeUrl",
1212
"workerpoolProdAddress",

environments/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export declare type KnownEnv = "prod" | "staging";
22
export declare type EnvKey =
33
| "smsUrl"
44
| "iexecGatewayUrl"
5-
| "resultProxyUrl"
5+
| "resultProxyUrl" // TODO remove
66
| "ipfsGatewayUrl"
77
| "ipfsNodeUrl"
88
/**

packages/sdk/abis/sharing/DataProtectorSharing.sol/DataProtectorSharing.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,11 +2007,6 @@
20072007
"internalType": "string",
20082008
"name": "iexecResultStorageProvider_",
20092009
"type": "string"
2010-
},
2011-
{
2012-
"internalType": "string",
2013-
"name": "iexecResultStorageProxy_",
2014-
"type": "string"
20152010
}
20162011
],
20172012
"name": "updateEnv",

packages/sdk/tests/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const TEST_CHAIN = {
1717
smsDebugURL: DRONE ? 'http://sms-debug:13300' : 'http://127.0.0.1:13301',
1818
resultProxyURL: DRONE
1919
? 'http://result-proxy:13200'
20-
: 'http://127.0.0.1:13200',
20+
: 'http://127.0.0.1:13200', // TODO remove
2121
iexecGatewayURL: DRONE ? 'http://market-api:3000' : 'http://127.0.0.1:3000',
2222
provider: new JsonRpcProvider(
2323
DRONE ? 'http://bellecour-fork:8545' : 'http://localhost:8545'

packages/sharing-smart-contract/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Changed
88

9+
- [BREAKING] Remove result proxy url from contract config and deal params (#438).
910
- Fix Sharing contract constructor arguments order (#433)
1011
- Update blockscout url
1112

packages/sharing-smart-contract/abis/DataProtectorSharing.sol/DataProtectorSharing.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,11 +2007,6 @@
20072007
"internalType": "string",
20082008
"name": "iexecResultStorageProvider_",
20092009
"type": "string"
2010-
},
2011-
{
2012-
"internalType": "string",
2013-
"name": "iexecResultStorageProxy_",
2014-
"type": "string"
20152010
}
20162011
],
20172012
"name": "updateEnv",

packages/sharing-smart-contract/contracts/DataProtectorSharing.sol

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ contract DataProtectorSharing is
7272
__AccessControl_init();
7373
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
7474

75-
updateEnv("ipfs", "https://result.v8-bellecour.iex.ec");
75+
updateEnv("ipfs");
7676
}
7777

7878
/***************************************************************************
@@ -261,11 +261,9 @@ contract DataProtectorSharing is
261261
* Admin *
262262
**************************************************************************/
263263
function updateEnv(
264-
string memory iexecResultStorageProvider_,
265-
string memory iexecResultStorageProxy_
264+
string memory iexecResultStorageProvider_
266265
) public onlyRole(DEFAULT_ADMIN_ROLE) {
267266
_iexecResultStorageProvider = iexecResultStorageProvider_;
268-
_iexecResultStorageProxy = iexecResultStorageProxy_;
269267
}
270268

271269
/***************************************************************************

packages/sharing-smart-contract/contracts/ManageOrders.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ abstract contract ManageOrders {
3838
0x0000000000000000000000000000000000000000000000000000000000000003; // [tee,scone]
3939
uint256 internal constant TRUST = 0; // No replication
4040
string internal _iexecResultStorageProvider;
41+
// [WARNING] This value is not used anymore but it must be kept
42+
// to not break deployed proxies when upgrading them.
4143
string internal _iexecResultStorageProxy;
4244
uint256 private _salt;
4345

@@ -166,8 +168,6 @@ abstract contract ManageOrders {
166168
'{"iexec_result_encryption":true', // solhint-disable-line quotes
167169
',"iexec_result_storage_provider":"', // solhint-disable-line quotes
168170
_iexecResultStorageProvider,
169-
'","iexec_result_storage_proxy":"', // solhint-disable-line quotes
170-
_iexecResultStorageProxy,
171171
'"}' // solhint-disable-line quotes
172172
);
173173
}

0 commit comments

Comments
 (0)