Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SS58 Warnings in Message Generator Scripts #865

Merged
merged 5 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add remark payload to message generators
  • Loading branch information
HCastano committed Apr 5, 2021
commit 805af9aaebf4270a83a119fdfc8fd3cbfeb44650
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FERDIE_ADDR=5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL
SHARED_CMD="/home/user/substrate-relay send-message rialto-to-millau"
SHARED_HOST="--source-host rialto-node-bob --source-port 9944"
DAVE_SIGNER="--source-signer //Dave --target-signer //Dave"
PAYLOAD="01234567"

SEND_MESSAGE="$SHARED_CMD $SHARED_HOST $DAVE_SIGNER"

Expand All @@ -38,7 +39,8 @@ do
$SEND_MESSAGE \
--lane $MESSAGE_LANE \
--origin Target \
remark
remark \
--remark-payload $PAYLOAD

rand_sleep
echo "Sending Transfer from Rialto to Millau using Target Origin"
Expand All @@ -54,7 +56,8 @@ do
$SEND_MESSAGE \
--lane $MESSAGE_LANE \
--origin Source \
remark
remark \
--remark-payload $PAYLOAD

rand_sleep
echo "Sending Transfer from Rialto to Millau using Source Origin"
Expand All @@ -75,6 +78,7 @@ do
--lane $MESSAGE_LANE \
--origin Target \
remark \
--remark-payload $PAYLOAD \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few issues with this (which are mostly introduced in other PRs, but probably must be fixed here):

  1. remark-payload is marked as conflicts_with("remark_size"), so you can't (actually can, but see (2)) use both here - in this case the --remark_size will be ignored;
  2. conflicts_with("remark_size") and conflicts_with("remark_payload") should actually be conflicts_with("remark-size") and conflicts_with("remark-payload") (i.e. underscore -> hyphen). Right now this declaration doesn't work;
  3. since remark_payload is now required, I don't see any point in keeping this payload generation. But actually I'd prefer to keep this and mark remark_payload as Optional<>.

--remark-size=max

rand_sleep
Expand All @@ -83,7 +87,8 @@ do
--lane $MESSAGE_LANE \
--origin Target \
--dispatch-weight=max \
remark
remark \
--remark-payload $PAYLOAD \

rand_sleep
echo "Sending Maximal Size and Dispatch Weight Remark from Rialto to Millau using Target Origin"
Expand All @@ -92,6 +97,7 @@ do
--origin Target \
--dispatch-weight=max \
remark \
--remark-payload $PAYLOAD \
--remark-size=max

fi
Expand All @@ -105,8 +111,8 @@ do
$SEND_MESSAGE \
--lane $MESSAGE_LANE \
--origin Target \
remark
remark \
--remark-payload $PAYLOAD
done

fi
done
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FERDIE_ADDR=5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL
SHARED_CMD=" /home/user/substrate-relay send-message millau-to-rialto"
SHARED_HOST="--source-host millau-node-bob --source-port 9944"
DAVE_SIGNER="--target-signer //Dave --source-signer //Dave"
PAYLOAD="01234567"

SEND_MESSAGE="$SHARED_CMD $SHARED_HOST $DAVE_SIGNER"

Expand All @@ -38,7 +39,8 @@ do
$SEND_MESSAGE \
--lane $MESSAGE_LANE \
--origin Target \
remark
remark \
--remark-payload $PAYLOAD

rand_sleep
echo "Sending Transfer from Millau to Rialto using Target Origin"
Expand All @@ -54,7 +56,8 @@ do
$SEND_MESSAGE \
--lane $MESSAGE_LANE \
--origin Source \
remark
remark \
--remark-payload $PAYLOAD

rand_sleep
echo "Sending Transfer from Millau to Rialto using Source Origin"
Expand All @@ -75,6 +78,7 @@ do
--lane $MESSAGE_LANE \
--origin Target \
remark \
--remark-payload $PAYLOAD \
--remark-size=max

rand_sleep
Expand All @@ -83,7 +87,8 @@ do
--lane $MESSAGE_LANE \
--origin Target \
--dispatch-weight=max \
remark
remark \
--remark-payload $PAYLOAD \

rand_sleep
echo "Sending Maximal Size and Dispatch Weight Remark from Millau to Rialto using Target Origin"
Expand All @@ -92,6 +97,7 @@ do
--origin Target \
--dispatch-weight=max \
remark \
--remark-payload $PAYLOAD \
--remark-size=max

fi
Expand All @@ -105,8 +111,8 @@ do
$SEND_MESSAGE \
--lane $MESSAGE_LANE \
--origin Target \
remark
remark \
--remark-payload $PAYLOAD
done

fi
done