Skip to content

Conversation

@brenzi
Copy link
Collaborator

@brenzi brenzi commented Nov 17, 2023

closes #1495

testing

run node on host:

./target/release/integritee-node --dev --tmp --unsafe-ws-external --rpc-cors all 

run sidechain

SGX_MODE=SW WORKER_MODE=sidechain WORKER_FEATURES=dcap make
cd bin
export RUST_LOG=info,substrate_api_client=warn,ws=warn,mio=warn,its_consensus_common=info,sidechain=info,integritee_service=trace,enclave_runtime=trace,ac_node_api=warn,sp_io=warn,itc_parentchain_indirect_calls_executor=trace,itp_stf_executor=trace,itc_parentchain_light_client=trace,itc_parentchain_block_importer=trace,itp_stf_state_handler=trace,ita_stf=trace,itp-attestation-handler=debug,itc_parentchain_indirect_calls_executor=trace,itp_top_pool=debug,itc_offchain_worker_executor=debug,ita_parentchain_interface=trace
./integritee-service -c -u ws://172.17.0.1 run --skip-ra --dev &> worker.log 

once you see the ProxyAdded event in js/apps, remember the delegator account which is the vault.

Now, use js/apps to send funds from Bob to Vault

  • worker log should show shielding for ....
  • and ita_stf::trusted_cal[....] balance_shield([...]

check shielded balance for Bob (find mrenclave in worker log)

./integritee-cli -u ws://172.17.0.1 trusted --mrenclave 2MyXuroF4yiR8A6S8t334C4ZvY6qyKxVBKsd8SPnVW3y balance //Bob

should return the amount you sent
q.e.d.

@brenzi brenzi requested a review from clangenb November 17, 2023 09:24
@brenzi brenzi added A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing labels Nov 17, 2023
Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Looks good to me in general, but I am failing to see where the vault account is set.


ParentchainEventHandler::handle_events(self, events)?;
let shard = self.get_default_shard();
if let Ok(vault) = self.stf_enclave_signer.get_shard_vault(&shard) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So we decide not to handle any events at all if the vault key is not present?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

at the moment. we'd need to become more generic yet if we want to support other cases

@brenzi brenzi merged commit 4e4de90 into master Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

listen to balance transfers to shard vault instead of Alice for shielding

3 participants