Skip to content

Commit

Permalink
Add line break in council signed message
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Jan 4, 2024
1 parent 9ef32d1 commit 46c117a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/phactory/src/prpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ impl<Platform: pal::Platform + Serialize + DeserializeOwned> PhactoryApi for Rpc
let genesis_hash = hex::encode(runtime_state.genesis_block_hash);
let mr_to = hex::encode(&request.measurement);
let mr_from = hex::encode(my_measurement()?);
let signed_message = format!("Allow pRuntime to handover from 0x{mr_from} to 0x{mr_to} on chain of genesis 0x{genesis_hash}").into_bytes();
let signed_message = format!("Allow pRuntime to handover\n from: 0x{mr_from}\n to: 0x{mr_to}\n genesis: 0x{genesis_hash}").into_bytes();
debug!("Signed message: {:?}", hex::encode(&signed_message));
let mut signers = std::collections::BTreeSet::new();
for sig in &request.signatures {
Expand Down
5 changes: 4 additions & 1 deletion docs/pruntime-handover-by-council.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Then the steps would be:

1. Ask at least half of the council members to sign a message as below:
```
Allow pRuntime to handover from 0x10c24c0e6bf8a86634417fcd8f934e62439c62907a6f1bc726906a50b054ddf10000000083d719e77deaca1470f6baf62a4d774303c899db69020f9c70ee1dfc08c7ce9e to 0xf42f7e095735702d1d3c6ac5fa3b4581d3c3673d3c5ce261a43fe782ccb3e1dc0000000083d719e77deaca1470f6baf62a4d774303c899db69020f9c70ee1dfc08c7ce9e on chain of genesis 0x0a15d23307d533d581291ff6dedca9ca10927c7dff6f4df9e8c3bf00bc5a6ded
Allow pRuntime to handover
from: 0x10c24c0e6bf8a86634417fcd8f934e62439c62907a6f1bc726906a50b054ddf10000000083d719e77deaca1470f6baf62a4d774303c899db69020f9c70ee1dfc08c7ce9e
to: 0xf42f7e095735702d1d3c6ac5fa3b4581d3c3673d3c5ce261a43fe782ccb3e1dc0000000083d719e77deaca1470f6baf62a4d774303c899db69020f9c70ee1dfc08c7ce9e
genesis: 0x0a15d23307d533d581291ff6dedca9ca10927c7dff6f4df9e8c3bf00bc5a6ded
```
See https://files.kvin.wang:8443/signit/ for an example

Expand Down

0 comments on commit 46c117a

Please sign in to comment.