Skip to content

Commit

Permalink
Update .sol doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush committed Sep 18, 2019
1 parent 3c86ce8 commit dc75e5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/contracts/Franklin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ contract Franklin {

// Register full exit request
// Params:
// - _franklinId - sender
// - _pubKye - packed public key of the user account
// - _token - token address, 0 address for ether
// - _signature - user signature
function fullExit (
Expand Down
3 changes: 2 additions & 1 deletion docs/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ A user can withdraw funds from the **root-chain balance** at any time by calling

User can request this expensive operation to withdraw funds if he thinks that his transactions are censored by validators.

The user must send a transaction to **Franklin** contract function `registerFullExit()`. This function creates **full exit priority request** that is placed in corresponding priority requests mapping and also emits **NewPriorityRequest(opType, pubData, expirationBlock)** event to notify validators that they must include this request to upcoming blocks. Complete **PriorityQueue** logic that handles **priority requests** is described in **Priority Requests** section.
The user must send a transaction to **Franklin** contract function `registerFullExit()`. This function creates **full exit priority request** that is placed in corresponding priority requests mapping and also emits **NewPriorityRequest(serialId, opType, pubData, expirationBlock)** event to notify validators that they must include this request to upcoming blocks. Complete **PriorityQueue** logic that handles **priority requests** is described in **Priority Requests** section.

When a validator commits a block which contains a **circuit operation** `full_exit`, the corresponding **withdraw onchain operation** for this withdrawal is created to verify compliance with priority queue requests. If it succeeds than their count will be added to **priority requests** count for this block. If the block is verified, funds from the **withdrawal onchain operation** are accrued to the users' **root-chain balances** and **withdraw onchain operations** and **full exit priority requests** are simply discarded.

Expand Down Expand Up @@ -74,6 +74,7 @@ This queue will be implemented in separate contract to ensure that priority oper

**NewPriorityRequest** event is emitted when a user send according transaction to Franklin contract. Also some info about it will be stored in the mapping (operation type and expiration block) strictly in the order of arrival.
**NewPriorityRequest** event structure:
- `serialId` - serial id of this priority request
- `opType` - operation type
- `pubData` - request data
- `expirationBlock` - the number of Ethereum block when request becomes expired
Expand Down

0 comments on commit dc75e5e

Please sign in to comment.