Daohub-io / cap9

Capability-based security protocol for smart contracts
Apache License 2.0
22 stars 10 forks source link

Procedure#Register Capability (Ewasm) #137

Closed Latrasis closed 5 years ago

Latrasis commented 5 years ago

Test Example in cap9-std/examples/register_test.rs should use #proc_register defined in the internal cap9-std crate.

We need to include a test in tests/syscalls/register.ts that:

  1. Includes Procedure A and Foreign Procedure B.
  2. Procedure A is designated a procedure register capability (type 0x4) that allows it to push a new procedure to the procedure table.
  3. Procedure A receives an address of Procedure B, and invokes the capability to add Procedure B into the procedure table.

Registration must follow steps outlined in docs/spec

JakeOShannessy commented 5 years ago

I want to split this into two steps:

Latrasis commented 5 years ago

I want to split this into two steps:

* [ ]  Be able to register a procedure, ignoring capability delegation and subsets.

* [ ]  Enforce capability delegation and subsets.

@JakeOShannessy: Makes sense

JakeOShannessy commented 5 years ago

Implemented enforcement of delegation/subsets and tested for write cap. Just need to implement the logic for the other caps.

JakeOShannessy commented 5 years ago

Logic implemented for other caps.

JakeOShannessy commented 5 years ago

Can be considered complete with #175.

JakeOShannessy commented 5 years ago

Closed with #175.