mining -> baking, continued

This commit is contained in:
Arthur Breitman 2017-11-01 04:13:23 -07:00
parent 4fb3874fea
commit 6dd9f2289a
26 changed files with 12 additions and 12 deletions

View File

@ -281,7 +281,7 @@ the appropriate value:
``` ```
$ ./alphanet.sh client list known identities $ ./alphanet.sh client list known identities
my_identity: tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H (public key known) (secret key known) my_identity: tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H (public key known) (secret key known)
$ ./alphanet.sh client rpc call /blocks/head/proto/helpers/rights/mining/delegate/tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H with '{}' $ ./alphanet.sh client rpc call /blocks/head/proto/helpers/rights/baking/delegate/tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H with '{}'
{ "ok": { "ok":
[ { "level": 1400.000000, "priority": 2.000000, [ { "level": 1400.000000, "priority": 2.000000,
"timestamp": "2017-05-19T03:21:52Z" }, "timestamp": "2017-05-19T03:21:52Z" },

View File

@ -26,9 +26,9 @@ index 3780bec2..36f91ff6 100644
+ Int64.(mul 6L 3600L) ; (* 6 hours *) + Int64.(mul 6L 3600L) ; (* 6 hours *)
slot_durations = slot_durations =
- List.map Period_repr.of_seconds_exn [ 60L ] ; - List.map Period_repr.of_seconds_exn [ 60L ] ;
- first_free_mining_slot = 16 ; - first_free_baking_slot = 16 ;
+ List.map Period_repr.of_seconds_exn [ 60L ; 30L ; 30L ; 30L ; 10L ] ; + List.map Period_repr.of_seconds_exn [ 60L ; 30L ; 30L ; 30L ; 10L ] ;
+ first_free_mining_slot = 4 ; + first_free_baking_slot = 4 ;
max_signing_slot = 15 ; max_signing_slot = 15 ;
instructions_per_transaction = 16 * 1024 ; instructions_per_transaction = 16 * 1024 ;
proof_of_work_threshold = proof_of_work_threshold =

View File

@ -68,7 +68,7 @@ may_create_identity() {
check_baker() { check_baker() {
pids=$(pgrep -x tezos-client 2>/dev/null) pids=$(pgrep -x tezos-client 2>/dev/null)
for pid in $pids; do for pid in $pids; do
if grep -- "-mining" "/proc/$pid/cmdline" >/dev/null 2>&1 ; then if grep -- "-baking" "/proc/$pid/cmdline" >/dev/null 2>&1 ; then
return 0 return 0
fi fi
done done
@ -81,13 +81,13 @@ run_baker() {
exit 1 exit 1
fi fi
echo "Start baker..." echo "Start baker..."
exec $client launch daemon -mining -max-priority 64 "$@" > "$client_dir/baker.log" exec $client launch daemon -baking -max-priority 64 "$@" > "$client_dir/baker.log"
} }
stop_baker() { stop_baker() {
pids=$(pgrep -x tezos-client 2>/dev/null) pids=$(pgrep -x tezos-client 2>/dev/null)
for pid in $pids; do for pid in $pids; do
if grep -- "-mining" "/proc/$pid/cmdline" >/dev/null 2>&1 ; then if grep -- "-baking" "/proc/$pid/cmdline" >/dev/null 2>&1 ; then
echo "Killing the baker..." echo "Killing the baker..."
kill "$pid" kill "$pid"
fi fi

View File

@ -329,7 +329,7 @@ module Assert = struct
let failed_to_preapply ~msg ?op f = let failed_to_preapply ~msg ?op f =
Assert.contain_error ~msg ~f:begin function Assert.contain_error ~msg ~f:begin function
| Client_mining_forge.Failed_to_preapply (op', err) -> | Client_baking_forge.Failed_to_preapply (op', err) ->
begin begin
match op with match op with
| None -> true | None -> true
@ -419,7 +419,7 @@ module Mining = struct
| Error _ -> assert false | Error _ -> assert false
| Ok nonce -> nonce in | Ok nonce -> nonce in
let seed_nonce_hash = Nonce.hash seed_nonce in let seed_nonce_hash = Nonce.hash seed_nonce in
Client_mining_forge.forge_block Client_baking_forge.forge_block
!rpc_config !rpc_config
block block
~operations ~operations

View File

@ -181,7 +181,7 @@ module Assert : sig
val initial_amount_too_low : msg:string -> 'a tzresult -> unit val initial_amount_too_low : msg:string -> 'a tzresult -> unit
val non_delegatable : msg:string -> 'a tzresult -> unit val non_delegatable : msg:string -> 'a tzresult -> unit
(** Endorsement / mining assertions *) (** Endorsement / baking assertions *)
val wrong_delegate : msg:string -> 'a tzresult -> unit val wrong_delegate : msg:string -> 'a tzresult -> unit

View File

@ -12,5 +12,5 @@
"cycle_length" : 4, "cycle_length" : 4,
"voting_period_length" : 2, "voting_period_length" : 2,
"time_before_reward" : 1, "time_before_reward" : 1,
"first_free_mining_slot" : 4 "first_free_baking_slot" : 4
} }

View File

@ -11,5 +11,5 @@
"slot_durations" : [ 1, 0 ], "slot_durations" : [ 1, 0 ],
"cycle_length" : 4, "cycle_length" : 4,
"time_before_reward" : 1, "time_before_reward" : 1,
"first_free_mining_slot" : 4 "first_free_baking_slot" : 4
} }

View File

@ -10,5 +10,5 @@
], ],
"slot_durations" : [ 1, 0 ], "slot_durations" : [ 1, 0 ],
"cycle_length" : 128, "cycle_length" : 128,
"first_free_mining_slot" : 4 "first_free_baking_slot" : 4
} }