Refactor docs into mdbook (#547)

* Refactor documentation, ef_tests makefile

* Add makefile to root

* Tidy readme

* Fix readme badges

* Tidy logs

* Add terminalize gif

* Update readme image

* Update readme image

* Tidy logs

* Update readme image

* Update readme

* Update readme

* Fix book link

* Update makefiles

* Update book

* Fix link in book

* Add readme for book

* Remove old docs, move api spec YAML

* Fix eth2/ dir readme

* Add readme for lcli

* Add about this book section

* Minor formatting improvements

* Address mehdi's comments
This commit is contained in:
Paul Hauner
2019-10-02 11:04:56 +10:00
committed by GitHub
parent 7eb82125ef
commit 9aedb12bfc
36 changed files with 701 additions and 1152 deletions

View File

@@ -10,7 +10,7 @@ use lmd_ghost::LmdGhost;
use operation_pool::DepositInsertStatus;
use operation_pool::{OperationPool, PersistedOperationPool};
use parking_lot::RwLock;
use slog::{error, info, trace, warn, Logger};
use slog::{debug, error, info, trace, warn, Logger};
use slot_clock::SlotClock;
use ssz::Encode;
use state_processing::per_block_processing::{
@@ -646,8 +646,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
trace!(
self.log,
"Beacon attestation imported";
"shard" => attestation.data.crosslink.shard,
"target_epoch" => attestation.data.target.epoch,
"shard" => attestation.data.crosslink.shard,
);
let _ = self
.event_handler
@@ -1397,12 +1397,16 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
info!(
self.log,
"New head beacon block";
"root" => format!("{}", beacon_block_root),
"slot" => new_slot,
);
debug!(
self.log,
"Head beacon block";
"justified_root" => format!("{}", beacon_state.current_justified_checkpoint.root),
"justified_epoch" => beacon_state.current_justified_checkpoint.epoch,
"finalized_root" => format!("{}", beacon_state.finalized_checkpoint.root),
"finalized_epoch" => beacon_state.finalized_checkpoint.epoch,
"root" => format!("{}", beacon_block_root),
"slot" => new_slot,
);
};

View File

@@ -13,7 +13,7 @@ use exit_future::Signal;
use futures::{future::Future, Stream};
use network::Service as NetworkService;
use rest_api::NetworkInfo;
use slog::{crit, error, info, o};
use slog::{crit, debug, error, info, o};
use slot_clock::SlotClock;
use std::marker::PhantomData;
use std::sync::Arc;
@@ -309,11 +309,16 @@ fn log_new_slot<T: BeaconChainTypes>(chain: &Arc<BeaconChain<T>>, log: &slog::Lo
info!(
log,
"Slot start";
"best_slot" => best_slot,
"slot" => current_slot,
);
debug!(
log,
"Slot info";
"skip_slots" => current_slot.saturating_sub(best_slot),
"best_block_root" => format!("{}", latest_block_root),
"best_block_slot" => best_slot,
"slot" => current_slot,
)
);
} else {
error!(
log,

File diff suppressed because it is too large Load Diff

View File

@@ -103,8 +103,9 @@ impl<T: BeaconChainTypes> AttestationService for AttestationServiceInstance<T> {
// Attestation was successfully processed.
info!(
self.log,
"PublishAttestation";
"type" => "valid_attestation",
"Valid attestation from RPC";
"target_epoch" => attestation.data.target.epoch,
"shard" => attestation.data.crosslink.shard,
);
// valid attestation, propagate to the network
@@ -123,8 +124,7 @@ impl<T: BeaconChainTypes> AttestationService for AttestationServiceInstance<T> {
.unwrap_or_else(|e| {
error!(
self.log,
"PublishAttestation";
"type" => "failed to publish attestation to gossipsub",
"Failed to gossip attestation";
"error" => format!("{:?}", e)
);
});
@@ -135,8 +135,7 @@ impl<T: BeaconChainTypes> AttestationService for AttestationServiceInstance<T> {
// Attestation was invalid
warn!(
self.log,
"PublishAttestation";
"type" => "invalid_attestation",
"Invalid attestation from RPC";
"error" => format!("{:?}", e),
);
resp.set_success(false);
@@ -146,8 +145,7 @@ impl<T: BeaconChainTypes> AttestationService for AttestationServiceInstance<T> {
// Some other error
warn!(
self.log,
"PublishAttestation";
"type" => "beacon_chain_error",
"Failed to process attestation from RPC";
"error" => format!("{:?}", e),
);
resp.set_success(false);

View File

@@ -105,8 +105,8 @@ impl<T: BeaconChainTypes> BeaconBlockService for BeaconBlockServiceInstance<T> {
info!(
self.log,
"Valid block from RPC";
"block_slot" => block.slot,
"block_root" => format!("{}", block_root),
"root" => format!("{}", block_root),
"slot" => block.slot,
);
// create the network topic to send on
@@ -126,8 +126,7 @@ impl<T: BeaconChainTypes> BeaconBlockService for BeaconBlockServiceInstance<T> {
.unwrap_or_else(|e| {
error!(
self.log,
"PublishBeaconBlock";
"type" => "failed to publish to gossipsub",
"Failed to gossip beacon block";
"error" => format!("{:?}", e)
);
});
@@ -151,8 +150,7 @@ impl<T: BeaconChainTypes> BeaconBlockService for BeaconBlockServiceInstance<T> {
// Some failure during processing.
error!(
self.log,
"PublishBeaconBlock";
"type" => "failed_to_process",
"Failed to process beacon block";
"error" => format!("{:?}", e)
);