Skip to content

Conversation

@realbigsean
Copy link
Member

Issue Addressed

Which issue # does this PR address?

Proposed Changes

Please list or describe the changes introduced by this PR.

Additional Info

Please provide any additional information. For example, future considerations
or information useful for reviewers.

RPCResponseErrorCode::ResourceUnavailable => 3,
RPCResponseErrorCode::Unknown => 255,
RPCResponseErrorCode::RateLimited => 139,
RPCResponseErrorCode::BlobsNotFoundForBlock => 140,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's being coded to 140 and decoded from 142

Comment on lines 961 to 962
Arc<SignedBeaconBlock<T::EthSpec>>,
Arc<BlobsSidecar<T::EthSpec>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it not easier here to return the wrapper directly?

Comment on lines 1049 to 1050
/// Returns `Ok(None)` if the blobs and associated block are not found. The block referenced by
/// the blob doesn't exist in our database.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returns `Ok(None)` if the blobs and associated block are not found. The block referenced by
/// the blob doesn't exist in our database.
/// Returns `Ok(None)` if the blobs and associated block are not found.

if block_epoch >= boundary_epoch {
error!(
self.log,
"Peer requested block and blob that should be available, but no blob found";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this

"peer" => %peer_id,
"request_root" => ?root,
"finalized_data_availability_boundary" => ?finalized_data_availability_boundary,
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to send an error as well (ResourceUnavailable?)

debug!(self.log, "Eip4844 fork is disabled");
self.send_error_response(
peer_id,
RPCResponseErrorCode::ResourceUnavailable,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should ever happen after we correctly advertise the libp2p protocols, so in a way to me it feels like libp2p logic leaking up. To be able to identify this scenarios I suggest a specific error, prob enough with InternalError (I think?)

Comment on lines +729 to +730
RPCResponseErrorCode::ResourceUnavailable,
"Backfilling".into(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this spec'd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how we handle the same scenario in blocks by range requests. The spec says

Peers that are unable to reply to block requests within the MIN_EPOCHS_FOR_BLOCK_REQUESTS epoch range SHOULD respond with error code 3: ResourceUnavailable. Such peers that are unable to successfully reply to this range of requests MAY get descored or disconnected at any time.

I think it applies here cause we don't have blocks during backfill

);
}
Err(e) => {
return error!(self.log, "Unable to obtain root iter";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be an internal server error response

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same handling as we have for blocks, should I update the handling there as well?

"peer" => %peer_id,
"block_root" => ?root
);
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id this is an error (from the log) don't we want to send some kind of error to the peer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also the same as how we handle blocks by range, i'll send you a prior conversation about this

Comment on lines 856 to 859
"start_slot" => %req.start_slot,
"current_slot" => %current_slot,
"requested" => %req.count,
"returned" => %blobs_sent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

Comment on lines 866 to 869
"start_slot" => %req.start_slot,
"current_slot" => %current_slot,
"requested" => %req.count,
"returned" => %blobs_sent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

@realbigsean realbigsean merged commit 32b0fb1 into sigp:eip4844 Jan 25, 2023
@realbigsean realbigsean deleted the sync-error-handling branch November 21, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants