Skip to content

Commit

Permalink
Change the version from 1.2.0 to 2.0.0, which means the 1.x and 2.x s…
Browse files Browse the repository at this point in the history
…worker are not compatible, cannot do ab-upgrade from 1.x to 2.x.

If the miner would like to use 2.x sworker, it means the machine would need to re-entry the network and the storage power would re-calculate from 0.
  • Loading branch information
wuhaixian1984 committed Apr 20, 2024
1 parent 9d13884 commit 17d0a91
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Please refer to [Crust sWorker docker mode](docs/Docker.md)
In /opt/crust/crust-sworker/etc/Config.json file you can configure your sworker application.
```
{
"base_path" : "/opt/crust/crust-sworker/1.2.0/sworker_base_path", # sWorker key information location, must be absolute path
"base_path" : "/opt/crust/crust-sworker/2.0.0/sworker_base_path", # sWorker key information location, must be absolute path
"base_url" : "http://127.0.0.1:12222/api/v0", # your sWorker node api address
"data_path" : ["/data1"], # If this item is not set, srd and sealing function cannot be applied
Expand All @@ -71,7 +71,7 @@ In /opt/crust/crust-sworker/etc/Config.json file you can configure your sworker

### Run
```
/opt/crust/crust-sworker/1.2.0/bin/crust-sworker -c /opt/crust/crust-sworker/1.2.0/etc/Config.json
/opt/crust/crust-sworker/2.0.0/bin/crust-sworker -c /opt/crust/crust-sworker/2.0.0/etc/Config.json
```

### Crust sWorker executable file
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.2.0
SWORKER=1.2.0
2.0.0
SWORKER=2.0.0
2 changes: 1 addition & 1 deletion docker/runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# crust sworker image
FROM crustio/crust-sworker-env:1.2.0
FROM crustio/crust-sworker-env:2.0.0

ARG BUILD_MODE

Expand Down
4 changes: 2 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Output:
"account" : "5EsgXyVJGnoGQ931Vcbzhcsi64unFhCoc5GhZUJnD8qvzu9j",
"mrenclave" : "cb8a24a6a971d738c6976269358e24bf2af578462fb92ead2d384b619fff6d4a",
"pub_key" : "95178acfcb9f1406de8b14a5f81fa141a2934fcfc6fefa58077ff6a823711b0d5f884332b0b2a8699cd6ce901a7add1bef97365e3a73054cf383bb8bd3cc9460",
"sworker_version" : "1.2.0",
"version" : "1.2.0"
"sworker_version" : "2.0.0",
"version" : "2.0.0"
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/app/include/Resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdint.h>
#include "Parameter.h"

#define VERSION "1.2.0"
#define VERSION "2.0.0"

#define CRUST_INST_DIR "/opt/crust/crust-sworker/" VERSION
#define ENCLAVE_FILE_PATH CRUST_INST_DIR "/etc/enclave.signed.so"
Expand Down
2 changes: 1 addition & 1 deletion src/enclave/include/Parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ typedef crust_status_t (*ecall_store2_f)(const uint8_t *u, size_t s);
typedef sgx_status_t (*ocall_get2_f)(crust_status_t *status, uint8_t *u, size_t s, size_t *rs);

// For all
#define SWORKER_VERSION "1.2.0"
#define SWORKER_VERSION "2.0.0"
#define LEAF_SEPARATOR "+leaf+"
#define EMPTY_BLOCK_CID "QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n"
#define EMPTY_BLOCK_FLAG "empty"
Expand Down

0 comments on commit 17d0a91

Please sign in to comment.