Update bsip-0040.md

This commit is contained in:
Stefan Schießl 2018-07-27 15:00:07 +02:00 committed by GitHub
parent 54d0ee678d
commit 1083311739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,10 +72,11 @@ List of possible asserts are:
| ------------- |:-------------:| -----:| | ------------- |:-------------:| -----:|
| `any` | [`list`, `of`, `allowed`, `values`] | stateless | | `any` | [`list`, `of`, `allowed`, `values`] | stateless |
| `range` | [`min`, `max`] | stateless | | `range` | [`min`, `max`] | stateless |
| `length` | [`min`, `max`] | stateless |
| `limit` | [`value`, `interval_in_sec`] | [`current_cumsum`, `interval_began`] | | `limit` | [`value`, `interval_in_sec`] | [`current_cumsum`, `interval_began`] |
| `limit_monthly` | [`value`, `interval_in_months`] | [`current_cumsum`, `interval_began`] | | `limit_monthly` | [`value`, `interval_in_months`] | [`current_cumsum`, `interval_began`] |
All asserts apply to `int`, `float` and `string`. If `string` should be compared with any number value, use the length of the string instead. Any more sophisticated data types are not included yet. All asserts apply to `int`, `string` and `object_ids`. There is no type converstion, incompatible type means assert failure. Any more sophisticated data types are not included yet. The `length` assert is specific to `string`, whereas `range`, `limit` and `limit_monthly` is only applicable to `int`.
Example A: Example A:
Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way: Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way:
@ -112,7 +113,7 @@ Notes: The implementation must not differentiate the logic, all operations recei
# Milestones # Milestones
We propose do split the implmentation into two milestones: We propose do split the implmentation into two milestones:
1. Implementation of basic functionaliy to allow custom active permissions and authorities, including `range` and `any` `asserts` 1. Implementation of basic functionaliy to allow custom active permissions and authorities, including `range`, `length` and `any` `asserts`
2. Evaluation of stateful asserts (performance) and if positive, implementation of `limit` and `limit_monthly` `asserts` 2. Evaluation of stateful asserts (performance) and if positive, implementation of `limit` and `limit_monthly` `asserts`
This approach allows as well to add other asserts at a later stage (with a new BSIP). This approach allows as well to add other asserts at a later stage (with a new BSIP).