Status | |
---|
Stakeholders | |
---|
Outcome | Jira |
---|
server | Hyperledger JIRA |
---|
serverId | 6326cb0b-65b2-38fd-a82c-67a89277103b |
---|
key | IR-934 |
---|
|
|
---|
Due date | |
---|
Owner | |
---|
...
trait PermissionChecker<Permission> {
pub fn check_permissions(instruction: ISI, authority: Id) -> Result<(), String>
}
Register<Permission, Account>: ISI
#[derive(Encode, Decode, Serialize, Deserialize)]
struct Account<Permission> {
permissions: Vec<Permission>,
account_data:
// .. other fields
}
struct Iroha<Permission, PC: PermissionChecker<Permission>> {
pub checker: PC,
// .. other fields
}
Iroha<Iroha1Permission, Iroha1PermissionChecker>
enum Iroha1Permission {
}
Pros
- Customizable permissions check logic
- Customizable permission type
- Permission check logic is written in pure rust - which is a turing complete and convenient language while ISIs are not yet there.
- Faster than WASM
- Does not introduce additional complexity as WASM does.
...