Skip to content

Latest commit

 

History

History
58 lines (33 loc) · 2.41 KB

Endorser.md

File metadata and controls

58 lines (33 loc) · 2.41 KB

Endorser Demo

There are two ways to run the alice/faber demo with endorser support enabled.

Run Faber as an Author, with a dedicated Endorser agent

This approach runs Faber as an un-privileged agent, and starts a dedicated Endorser sub-process to endorse Faber's transactions.

Start a VON Network and a Tails server.

Start up Faber as Author (note the tails file size override, to allow testing of the revocation registry roll-over):

TAILS_FILE_COUNT=5 ./run_demo faber --endorser-role author --revocation

Start up Alcie as normal:

./run_demo alice

You can run all of Faber's functions as normal - if you watch the console you will see that all ledger operations go through the endorser workflow.

If you issue more than 5 credentials, you will see Faber creating a new revocation registry (encluding endorser operations).

Run Alice as an Author and Faber as an Endorser

This approach sets up the endorser roles to allow manual testing using the agents' swagger pages:

  • Faber runs as an Endorser (all of Faber's functions - issue credential, request proof, etc.) run normally, since Faber has ledger write access
  • Alice starts up with a DID aith Author privileges (no ledger write access) and Faber is setup as Alice's Endorser

Start a VON Network and a Tails server.

Start up Faber as Endorser:

TAILS_FILE_COUNT=5 ./run_demo faber --endorser-role endorser --revocation

Start up Alice as Author:

TAILS_FILE_COUNT=5 ./run_demo alice --endorser-role author --revocation

Copy the invitation from Faber to Alice to complete the connection.

Then in the Alice shell, select option "D" and copy Faber's DID (it is the DID displayed on faber agent startup).

This starts up the ACA-Py agents with the endorser role set (via the new command-line args) and sets up the connection between the 2 agents with appropriate configuration.

Then, in the Alice swagger page you can create a schema and cred def, and all the endorser steps will happen automatically. You don't need to specify a connection id or explicitly request endorsement (ACA-Py does it all automatically based on the startup args).

If you check the endorser transaction records in either Alice or Faber you can see that the endorser protocol executes automatically and the appropriate endorsements were endorsed before writing the transactions to the ledger.