Skip to content

make RPS demo work with mainnet #551

@brenzi

Description

@brenzi

Currently, the RPS demo syncs with mainnet and produces sidechain blocks (although logging ugly errors)

However, block confirmations are not working, because the RPS demo branch is outdated with respect to spec_version 5

Some hot fixes

diff --git a/core-primitives/settings/src/lib.rs b/core-primitives/settings/src/lib.rs
index 52daf93..d3a54c0 100644
--- a/core-primitives/settings/src/lib.rs
+++ b/core-primitives/settings/src/lib.rs
@@ -96,7 +96,7 @@ pub mod node {
        pub static BLOCK_CONFIRMED: u8 = 4u8;
        pub static SHIELD_FUNDS: u8 = 5u8;
        // bump this to be consistent with integritee-node runtime
-       pub static RUNTIME_SPEC_VERSION: u32 = 2;
+       pub static RUNTIME_SPEC_VERSION: u32 = 5;
        pub static RUNTIME_TRANSACTION_VERSION: u32 = 1;
        pub static UNSHIELD: u8 = 6u8;
 }
diff --git a/cli/demo_rps.sh b/cli/demo_rps.sh
index e025b36..c94e2b2 100755
--- a/cli/demo_rps.sh
+++ b/cli/demo_rps.sh
@@ -19,7 +19,7 @@
 # TEST_BALANCE_RUN is either "first" or "second"
 # if -m file is set, the mrenclave will be read from file

-while getopts ":m:p:P:t:" opt; do
+while getopts ":m:p:P:t:u:" opt; do
     case $opt in
         t)
             TEST=$OPTARG
@@ -27,7 +27,10 @@ while getopts ":m:p:P:t:" opt; do
         m)
             READMRENCLAVE=$OPTARG
             ;;
-        p)
+        u)
+           NURL=$OPTARG
+           ;;
+       p)
             NPORT=$OPTARG
             ;;
         P)
@@ -39,11 +42,12 @@ done
 # using default port if none given as arguments
 NPORT=${NPORT:-9944}
 RPORT=${RPORT:-2000}
-
+NURL=${NURL:"ws://127.0.0.1"}
+echo "Using node url ${NURL}"
 echo "Using node-port ${NPORT}"
 echo "Using worker-rpc-port ${RPORT}"

-CLIENT="./../bin/integritee-cli -p ${NPORT} -P ${RPORT}"
+CLIENT="./../bin/integritee-cli -u ${NURL} -p ${NPORT} -P ${RPORT}"

then, start

 ./integritee-service -u wss://api.solo.integritee.io -p 443 run
...
 ./demo_rps.sh -u wss://api.solo.integritee.io -p 443

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions