-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alpha Implementation of Specification #129
Conversation
This updates the procedure list and procedure heap to use the correct formats. It does not attempt to address minting and delegation and simply allows anything to be registered. Minting and delegation will be addressed in a later PR.
@JakeOShannessy: Please let me know which issues are addressed here and when this is ready for review. |
Still subject to #130, but that's an existing condition, so it's mergable. |
So at Kernel.sol:704, we're setting that |
That was previously a requirement from our original tests. There's no functional reason we need to prevent it. |
I'll just leave a note here, some of those capability functions are quite hairy. The number of local solidity variables you can have runs out fast, so there is quite a bit of re-use of variables. Sorry about that. Welcome to the 1960's. |
Let me know when you're done with comments, I was going to do some review when I saw your comments. So once you've had a look through I'll start fiddling and update re: the comments above. |
Awesome work! As far as I'm concerned, with upgrading working ( |
This required some error code plumbing to be done. I also removed one of the checks that returned an error code if the procedure name already exists. This way we only check that problem once rather than having unreachable code.
Addressed. |
This is a quick patch that sets the clists to zero length before registering. The final choice for how we deal with clist deletion is to be made in #129.
There use to be a special cap class to monkey patch the fact that the capIndex value it not passed through correctly. This is now fixed.
In order to achieve some of the goals I needed to do a slight restructure. The fact that we use a custom method for storage impedes some of the structure that Solidity assumes, so it may not conform to the right principles. The most important thing was that the definition of kernel storage was able to be abstracted into its own layer, that is achieved. Here is a diagram of how everything is currently structured (this is included in docs/media): This doesn't use any libraries, only contract inheritance, we already introduce a lot of CALLs already, so best to avoid them if not necessary. This information is of particular importance to #120. |
This commit gives TestKernel a constructor which takes an initial entry procedure. This required test changes throughout. The implementation will need to be updated to have a better architecture, but this implements the concepts and updates tests for compatibility. The next steps will be to move it to a level lower then TestKernel and abstract some of the initial cap setup. The concept is documented in in issue #130.
This moves the constructor and bootstrap mechanism to another layer in KernelInstance.sol, as per #130.
This comment has been minimized.
This comment has been minimized.
The tests pass locally, and if they pass on CI this should be merged. |
This PR contains pretty much all of the spec implementation with the sole exception of secure cap delegation. Currently there is an exception made where any capability can be registered as long as you have a register capability.
Once that's implemented this can be considered complete. All tests have been updated to pass.