Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ab37149
enable target_a and _b syncing for sidechain mode and prepare new dem…
brenzi Nov 23, 2023
2ae982d
add shard vault proxy account on target A/B as well. derivation is de…
brenzi Nov 23, 2023
d62b26d
prepare event listener on target A and fix demoscript
brenzi Nov 23, 2023
d9bff04
remove old enclave_bridge unshield call from trusted_call
brenzi Nov 23, 2023
e9c408c
abstracting parentchain effect opaque_calls. stf can send to any pare…
brenzi Nov 23, 2023
ff686b6
sending stf extrinsics to all parentchains now
brenzi Nov 24, 2023
ec5918e
WIP: triggering block import of target_a and b upon sidechain on_slot
brenzi Nov 24, 2023
42b10e7
refactored aura to trigger target_a and target_b import
brenzi Nov 25, 2023
2f12d4b
shielding from target_a worked
brenzi Nov 25, 2023
a62dc20
demo passes first and second rungit add -u!
brenzi Nov 25, 2023
3c5cafc
log cosmetics
brenzi Nov 26, 2023
72f2849
generic event display (fails). log cosmetics
brenzi Nov 27, 2023
30c1ef5
hack the fees. and more pimps
brenzi Nov 27, 2023
c46c67b
recorded demo with this
brenzi Nov 27, 2023
90cb372
fixed cargo test
brenzi Nov 28, 2023
6d97c2a
clippy
brenzi Nov 28, 2023
c47a9c5
fixed enclave tests
brenzi Nov 28, 2023
6eacfd7
cleanup
brenzi Nov 28, 2023
886af3b
Merge branch 'master' into ab/target-a-shielding-unshielding-sidechai…
brenzi Nov 28, 2023
b16439c
fix CI
brenzi Nov 28, 2023
2ea0472
CI: introduce fee tolerance when assering balances
brenzi Nov 28, 2023
13c20f3
fix evm tests
brenzi Nov 28, 2023
20b7468
fix
brenzi Nov 28, 2023
83ee1aa
clippy with test flag
brenzi Nov 28, 2023
39a3147
fix demo_sidechain with fee tolerance
brenzi Nov 28, 2023
a70685d
CI fixes
brenzi Nov 28, 2023
b75036e
review remarks fixed
brenzi Nov 29, 2023
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
Prev Previous commit
Next Next commit
demo passes first and second rungit add -u!
  • Loading branch information
brenzi committed Nov 25, 2023
commit a62dc20d3ae45c7b017e29bd23007724a67cf1bd
2 changes: 1 addition & 1 deletion app-libs/parentchain-interface/src/target_a/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ where
if args.destination == ALICE_ACCOUNT_ID.into() {
Some(IndirectCall::TransferToAliceShieldsFunds(args))
} else {
log::debug!("Parentchain transfer was not for Alice; ignoring...");
log::debug!("Parentchain transfer extrinsic was not for Alice; ignoring...");
// No need to put it into the top pool if it isn't executed in the first place.
None
}
Expand Down
2 changes: 1 addition & 1 deletion app-libs/stf/src/trusted_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ where
None::<ProxyType>,
vault_transfer_call,
));
calls.push(ParentchainCall::Integritee(proxy_call));
calls.push(ParentchainCall::TargetA(proxy_call));
Ok(())
},
TrustedCall::balance_shield(enclave_account, who, value) => {
Expand Down
38 changes: 17 additions & 21 deletions cli/demo_shielding_unshielding_using_shard_vault_on_target_a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ function wait_assert_state()
exit 1
}

function wait_assert_state_target_a()
{
for i in $(seq 1 $WAIT_ROUNDS); do
sleep $WAIT_INTERVAL_SECONDS
state=$(${CLIENT_A} "$2" "$1")
if [ $state -eq "$3" ]; then
return
else
echo -n "."
fi
done
echo
echo "Assert $1 $2 failed, expected = $3, actual = $state"
exit 1
}
# Do a live query and assert the given account's state is equal to expected
# usage:
# assert_state <mrenclave> <account> <state-name> <expected-state>
Expand All @@ -144,25 +159,6 @@ function assert_state()
exit 1
}

# Do a live query and assert the given account's state is equal to expected
# usage:
# assert_state_target_a <account> <state-name> <expected-state>
function assert_state_target_a()
{
state=$(${CLIENT_A} "$2" "$1")
if [ -z "$state" ]; then
echo "Query $1 $2 failed"
exit 1
fi

if [ $state -eq "$3" ]; then
return
fi
echo
echo "Assert $1 $2 failed, expected = $3, actual = $state"
exit 1
}

echo "* Query on-chain enclave registry:"
${CLIENT} list-workers
echo ""
Expand Down Expand Up @@ -220,7 +216,7 @@ echo "✔ ok"
echo ""

echo "* Send ${AMOUNT_TRANSFER} funds from Charlie's L2 account to Bob's incognito account"
$CLIENT trusted --mrenclave ${MRENCLAVE} transfer //Charlie ${ICGACCOUNTBOB} ${AMOUNT_TRANSFER}
$CLIENT trusted $CALLTYPE --mrenclave ${MRENCLAVE} transfer //Charlie ${ICGACCOUNTBOB} ${AMOUNT_TRANSFER}
echo ""

echo "* Wait and assert Charlie's L2 account balance... "
Expand All @@ -233,7 +229,7 @@ echo "✔ ok"
echo ""

echo "* Un-shield ${AMOUNT_UNSHIELD} tokens from Charlie's incognito account to Ferie's L1 account"
${CLIENT} trusted --mrenclave ${MRENCLAVE} unshield-funds //Charlie //Ferdie ${AMOUNT_UNSHIELD}
${CLIENT} trusted $CALLTYPE --mrenclave ${MRENCLAVE} unshield-funds //Charlie //Ferdie ${AMOUNT_UNSHIELD}
echo ""

echo "* Wait and assert Charlie's incognito account balance... "
Expand Down