Skip to content

PDO To Do List

Mic Bowman edited this page Mar 20, 2019 · 13 revisions

This is non-comprehensive to-do list for PDO:

Open Tasks

  • Add a switch to the request and contract tests that sets the timeout for enclave requests. For testing purposes, we should be setting the timeout very high so that even slow systems won't timeout and break the tests.
  • Add a switch to the request and contract tests to specify the name of the save file to use for the contract. Right now the multi-client tests successive clients overwrite the PDO file. This isn't really a problem (no adverse behavior).
  • Authentication mechanism for shutting down the storage, enclave and provisioning services; this should probably take the form of a signed nonce where the authorized key is stored in the service configuration file.
  • We have start, stop and status scripts for provisioning, enclave and storage services. These are all roughly the same shell script. It would be nice to have a more general mechanism for starting and stopping the services.
  • Prevent contract creator from provisioning other enclaves. This will require changing the registration transaction for Sawtooth to take a list of enclaves and then will require it to reject provisioning keys for any other enclaves. The provisioning service should also check to make sure that requesting enclaves are in the ledger.
  • In the test procedures (test-secrets, test-request and test-contract) replace the secrets helper with a wrapper for the provisioning service enclave like what we already do for the contract enclave.
  • Remove the root block from the Sawtooth transaction. There is no particular value in pushing it with the storage service replication policy. That is, the root block is just another block.
  • Add garbage collector for the client state cache. This might take the form of a simple service. The advantage of that approach is that we could add a script for a client to replicate state based on commitments to the ledger for subscribed contracts.

Completed Tasks

  • Replace the code passed in the invocation request with a hash. Require that the code be pushed into the storage service prior to any method invocation. That should remove one more big chunk of data from the slow path.
  • Replace the JSON encoding for the contract invocation request and response. This adds a number of additional format conversions that just slow things down. The JSON was helpful for getting the APIs figured out & debugging, but need to be replace with something faster.
  • Add requests session to the storage service client similar to the enclave client. Convert the storage service to use the same WSGI structure that we are using with the enclave service. We have seen very infrequent timeouts in the storage service that might be caused by the same problem with twisted (partial writes) that affected the eservice.
  • Fix the filename for the client cache. Currently using all but the first 16 characters rather than limiting the name to the first 16 characters. This does not break anything, but is not the expected behavior.
Clone this wiki locally