Skip to content

Commit 66cfbb0

Browse files
committed
perf: disable SA checking in shards
If the shards and coordinators sit inside the secure perimeter, and the coordinator is trusted to validate sentinel attestations honestly, the shard is just duplicating effort for no benefit by checking them. Signed-off-by: Sam Stuewe <[email protected]>
1 parent 60c0a3b commit 66cfbb0

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/uhs/twophase/locking_shard/controller.cpp

+2-16
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,8 @@ namespace cbdc::locking_shard {
206206
if(maybe_req) {
207207
valid = std::visit(
208208
overloaded{
209-
[&](rpc::lock_params&& params) -> bool {
210-
auto result = true;
211-
for(auto&& t : params) {
212-
if(!transaction::validation::check_attestations(
213-
t.m_tx,
214-
m_opts.m_sentinel_public_keys,
215-
m_opts.m_attestation_threshold)) {
216-
m_logger->warn(
217-
"Received invalid compact transaction",
218-
to_string(t.m_tx.m_id));
219-
result = false;
220-
break;
221-
}
222-
}
223-
224-
return result;
209+
[&](rpc::lock_params&&) -> bool {
210+
return true;
225211
},
226212
[&](rpc::apply_params&&) -> bool {
227213
return true;

0 commit comments

Comments
 (0)