Ease of developing appropriate implementations from the specification. A high degree of freedom should be provided in how to design programs
Given a money minter and two purses A and B, design a transaction where user A can securely send money to user B, using the capability pattern of sealer-unsealer.
The architecture (consisted of the main entity mintMaker
, making the Mint
Object, representing a new currency. It has a fixed amount of total balance. It employs the Factory Pattern to further create two Purse
objects, Alice and Bob, which it can initialize with a certain balance. This is implemented in steps (1)-(2). Now, the question is whether Alice can pay some of its money to Bob while conserving the total currency. Some of the goals the architecture needs to achieve \citep{millerFinancial} are:
- (T1) Only someone with the mint has the power to change the total balance of that currency
- (T2)
Purse A
cannot change the balance ofPurse B
- (T3) Balances should always be positive
- (T4) If a successful deposit gets reported, Alice should be guaranteed that the deposit was conducted in the other wallet
One can assume that the Sealer and Unsealer primitives, as well as the Mint object (steps (1)-(2) in the diagram), were implemented. The user tasks for both languages to securely transfer money via an intermediate Purse Object with the Sealer-Unsealer pattern. It should consist of the following methods:
getBalance(): Int
- Get the current balance in the pursesprout(): Purse
- Create a new empty pursegetDecr(): SealedBox[Int -> void]
- Get a sealed version ofdecr
. A hint was provided that should be used to validate (T4) duringdeposit
to the empty Wallet and Bob.decr
is a function that subtracts the balance in the current Pursedeposit(amount:Int,src:Purse):void
- Securely transmits money from one wallet to anotherprint():void
- (Optional) Print debugging information
The programmer's expected steps are to understand the respective codebase and extend the program's functionality.
The top-level code is provided in listing \ref{list:simpleMoneyTop}.
def paymentEnvelopeForBob = alicePurse.sprout()
paymentEnvelope.deposit(100, alicePurse)
bobPurse.deposit(10, paymentEnvelope) // Assumption that Alice has access to the correct object
... // Checks for correct balances
Instructions were the same for Wyvern and Rust implementation, with slightly different filenames. They were to implement the architecture above and then come up with potential vulnerabilities in their implementation. Existing boilerplate code and the todo list for implementing the function are provided in the code
Please provide your ratings out of 5 on the following:
- How useful do you think capabilities are?
- How much did you like working on Wyvern?
- How much did you like working on Rust?
- How much do you think you understand the concept of capabilities?
Subjective questions: Is there a part of the language / task design which the participant would want to be improved?