diff --git a/src/proto_alpha/lib_baking/test/test_endorsement.ml b/src/proto_alpha/lib_baking/test/test_endorsement.ml index ac8ab0b80..59a8a9d0a 100644 --- a/src/proto_alpha/lib_baking/test/test_endorsement.ml +++ b/src/proto_alpha/lib_baking/test/test_endorsement.ml @@ -107,7 +107,7 @@ let test_endorsement_rewards block0 = done ; return (!account, !cpt) in - let bond = Tez.to_mutez Constants.endorsement_bond_cost in + let bond = Tez.to_mutez Constants.endorsement_security_deposit in (* Endorsement Rights *) (* #1 endorse & inject in a block *) diff --git a/src/proto_alpha/lib_protocol/src/alpha_context.mli b/src/proto_alpha/lib_protocol/src/alpha_context.mli index 774b43c0d..4d7e57937 100644 --- a/src/proto_alpha/lib_protocol/src/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/src/alpha_context.mli @@ -261,7 +261,7 @@ module Constants : sig val seed_nonce_revelation_tip: Tez.t val origination_burn: Tez.t val block_security_deposit: Tez.t - val endorsement_bond_cost: Tez.t + val endorsement_security_deposit: Tez.t val faucet_credit: Tez.t val preserved_cycles: context -> int diff --git a/src/proto_alpha/lib_protocol/src/baking.ml b/src/proto_alpha/lib_protocol/src/baking.ml index f7c283938..6bd127bd1 100644 --- a/src/proto_alpha/lib_protocol/src/baking.ml +++ b/src/proto_alpha/lib_protocol/src/baking.ml @@ -140,7 +140,7 @@ let freeze_baking_bond ctxt { Block_header.priority ; _ } delegate = return (ctxt, bond) let freeze_endorsement_bond ctxt delegate = - let bond = Constants.endorsement_bond_cost in + let bond = Constants.endorsement_security_deposit in Delegate.freeze_bond ctxt delegate bond |> trace Cannot_freeze_endorsement_bond diff --git a/src/proto_alpha/lib_protocol/src/baking.mli b/src/proto_alpha/lib_protocol/src/baking.mli index 5b6e8af97..a2829bf09 100644 --- a/src/proto_alpha/lib_protocol/src/baking.mli +++ b/src/proto_alpha/lib_protocol/src/baking.mli @@ -44,7 +44,7 @@ val freeze_baking_bond: (context * Tez.t) tzresult Lwt.t (** [freeze_endorsement_bond: ctxt delegate] - Freeze the endorsement bond (See !Constants.endorsement_bond_cost) + Freeze the endorsement bond (See !Constants.endorsement_security_deposit) from the delegate account. Raise an error if the baker account does not have enough diff --git a/src/proto_alpha/lib_protocol/src/constants_repr.ml b/src/proto_alpha/lib_protocol/src/constants_repr.ml index a5126cb3d..ef04cebf0 100644 --- a/src/proto_alpha/lib_protocol/src/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/src/constants_repr.ml @@ -25,7 +25,7 @@ let block_security_deposit = Tez_repr.(mul_exn one 512) (* 64 tez *) -let endorsement_bond_cost = +let endorsement_security_deposit = Tez_repr.(mul_exn one 64) (* 16 tez *) diff --git a/src/proto_alpha/lib_protocol/test/test_endorsement.ml b/src/proto_alpha/lib_protocol/test/test_endorsement.ml index d701bc007..36265cdd3 100644 --- a/src/proto_alpha/lib_protocol/test/test_endorsement.ml +++ b/src/proto_alpha/lib_protocol/test/test_endorsement.ml @@ -69,14 +69,14 @@ let test_endorsement_payment () = result.tezos_context protocol_data root.tezos_header.shell.timestamp >>=? fun baker_pub -> let baker_hpub = Ed25519.Public_key.hash baker_pub in - let endorsement_bond_cost = - Constants.endorsement_bond_cost in + let endorsement_security_deposit = + Constants.endorsement_security_deposit in let baking = baker_hpub = contract_p.hpub && block_priority < 4 in let block_security_deposit = if baking then Constants.block_security_deposit else Tez.zero in - let cost = Cast.tez_add endorsement_bond_cost block_security_deposit in + let cost = Cast.tez_add endorsement_security_deposit block_security_deposit in let expected_balance = Cast.tez_sub init_balance cost in Assert.equal_tez ~msg: __LOC__ expected_balance bond_balance ; (* After one cycle, (4 blocks in test/proto_alpha/sandbox), @@ -86,7 +86,7 @@ let test_endorsement_payment () = get_balance_res contract_p result >>=? fun reward_balance -> Proto_alpha.Baking.endorsement_reward ~block_priority >>=? fun reward -> let expected_balance = Cast.tez_add expected_balance reward in - let expected_balance = Cast.tez_add expected_balance endorsement_bond_cost in + let expected_balance = Cast.tez_add expected_balance endorsement_security_deposit in Assert.equal_tez ~msg: __LOC__ expected_balance reward_balance ; return () in