Add trace spans to GetBlock methods for a better understanding of block proposal delays (#6903)

* Add trace spans to GetBlock methods for a better understanding of block proposal delays
This commit is contained in:
Preston Van Loon 2020-08-06 01:43:46 -07:00 committed by GitHub
parent ec21316efd
commit 40b68da486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,6 +423,9 @@ func (vs *Server) computeStateRoot(ctx context.Context, block *ethpb.SignedBeaco
// enough support, then use that vote for basis of determining deposits, otherwise use current state
// eth1data.
func (vs *Server) deposits(ctx context.Context, currentVote *ethpb.Eth1Data) ([]*ethpb.Deposit, error) {
ctx, span := trace.StartSpan(ctx, "ProposerServer.deposits")
defer span.End()
if vs.MockEth1Votes || !vs.Eth1InfoFetcher.IsConnectedToETH1() {
return []*ethpb.Deposit{}, nil
}
@ -512,6 +515,9 @@ func (vs *Server) canonicalEth1Data(
}
func (vs *Server) depositTrie(ctx context.Context, canonicalEth1DataHeight *big.Int) (*trieutil.SparseMerkleTrie, error) {
ctx, span := trace.StartSpan(ctx, "ProposerServer.depositTrie")
defer span.End()
var depositTrie *trieutil.SparseMerkleTrie
var finalizedDeposits *depositcache.FinalizedDeposits