diff --git a/messaging.rst b/messaging.rst index 0d11e7c..42caaa2 100644 --- a/messaging.rst +++ b/messaging.rst @@ -62,7 +62,7 @@ Invariants Hash ^^^^ -- ``sha3_keccak(expiration || amount || hashlock)`` +- ``sha3_keccak(expiration || amount || secrethash)`` Fields ^^^^^^ @@ -74,7 +74,7 @@ Fields +----------------------+-------------+------------------------------------------------------------+ | locked_amount | uint256 | amount of tokens held by the lock | +----------------------+-------------+------------------------------------------------------------+ -| hashlock | bytes32 | sha3 of the secret | +| secrethash | bytes32 | sha3 of the secret | +----------------------+-------------+------------------------------------------------------------+ @@ -146,7 +146,7 @@ Fields +======================+===============+============================================================+ | payment_amount | uint256 | The amount received by the node once secret is revealed | +----------------------+---------------+------------------------------------------------------------+ -| lock_hashlock | bytes32 | Specifies which lock is being unlocked | +| lock_secrethash | bytes32 | Specifies which lock is being unlocked | +----------------------+---------------+------------------------------------------------------------+ | signature | bytes | Elliptic Curve 256k1 signature | +----------------------+---------------+------------------------------------------------------------+ @@ -205,7 +205,7 @@ Fields +----------------------+---------------+------------------------------------------------------------+ | Field Name | Field Type | Description | +======================+===============+============================================================+ -| hashlock | bytes32 | The hashlock to remove | +| secrethash | bytes32 | The hashlock to remove | +----------------------+---------------+------------------------------------------------------------+ | balance_proof | BalanceProof | The updated balance proof | +----------------------+---------------+------------------------------------------------------------+ @@ -252,7 +252,7 @@ A succesfull direct transfer involves only 2 messages. The direct transfer messa Mediated Transfer ^^^^^^^^^^^^^^^^^ -A :term:`Mediated Transfer` is a hashlocked transfer. Currently raiden supports only one type of lock. The lock has an amount that is being transferred, a :term:`hashlock` used to verify the secret that unlocks it, and a :term:`lock expiration` to determine its validity. +A :term:`Mediated Transfer` is a hashlocked transfer. Currently raiden supports only one type of lock. The lock has an amount that is being transferred, a :term:`secrethash` used to verify the secret that unlocks it, and a :term:`lock expiration` to determine its validity. Mediated transfers have an :term:`initiator` and a :term:`target` and a number of hops in between. The number of hops can also be zero as these transfers can also be sent to a direct partner. Assuming ``N`` number of hops a mediated transfer will require ``6N + 8`` messages to complete. These are: diff --git a/pathfinding_service.rst b/pathfinding_service.rst index ddcad4a..4e8bb06 100644 --- a/pathfinding_service.rst +++ b/pathfinding_service.rst @@ -46,7 +46,7 @@ The following data types are taken from the Raiden Core spec. * uint64: expiration * uint256: locked_amount -* bytes32: hashlock +* bytes32: secrethash Public Endpoints ---------------- @@ -100,12 +100,12 @@ Example { "expiration": 200 "locked_amount": 40 - "hashlock": "" + "secrethash": "" }, { "expiration": 50 "locked_amount": 10 - "hashlock": "" + "secrethash": "" }, ], }' /api/1/balance diff --git a/smart_contracts.rst b/smart_contracts.rst index d92be3f..ed98122 100644 --- a/smart_contracts.rst +++ b/smart_contracts.rst @@ -234,7 +234,7 @@ Unlocks a pending transfer by providing the secret and increases the partner's t address partner, uint64 expiration_block, uint locked_amount, - bytes32 hashlock, + bytes32 secrethash, bytes merkle_proof, bytes32 secret) public @@ -244,7 +244,7 @@ Unlocks a pending transfer by providing the secret and increases the partner's t address partner, uint64 expiration_block, uint256 locked_amount, - bytes32 hashlock, + bytes32 secrethash, bytes merkle_proof, bytes32 secret) external @@ -257,9 +257,9 @@ Unlocks a pending transfer by providing the secret and increases the partner's t - ``partner``: Ethereum address of the channel participant that pays the ``locked_amount``. - ``expiration_block``: The absolute block number at which the lock expires. - ``locked_amount``: The number of tokens being transferred. -- ``hashlock``: A hashed secret, ``sha3_keccack(secret)``. +- ``secrethash``: A hashed secret, ``sha3_keccack(secret)``. - ``merkle_proof``: The merkle proof needed to compute the merkle root. -- ``secret``: The preimage used to derive a hashlock. +- ``secret``: The preimage used to derive a secrethash. - ``payer_participant``: Ethereum address of the channel participant whose ``transferred_amount`` will be increased. - ``transferred_amount``: The total amount of tokens that the ``payer_participant`` owes to the channel participant that calls this function. @@ -336,7 +336,7 @@ Getters function getSecretBlockHeight(bytes32 secret) public constant returns (uint64) -- ``secret``: The preimage used to derive a hashlock. +- ``secret``: The preimage used to derive a secrethash. Data types definition --------------------- diff --git a/terminology.rst b/terminology.rst index 15cedcf..98b4954 100644 --- a/terminology.rst +++ b/terminology.rst @@ -64,7 +64,7 @@ Raiden Terminology lockhash The hash of a lock. ``sha3_keccack(lock)`` - hashlock + secrethash The hash of a :term:`secret`. ``sha3_keccack(secret)`` balance proof