The method namespace_ids_for_offset is intended to get a list of NamespaceIds for a given Transaction offset on a Block Header. Considering implementation details the Block Header doesn't actually have access to this information, based on the discussion here: https://github.com/EspressoSystems/espresso-sequencer/pull/1428#discussion_r1596717521.
Since this method is only utilized for TransactionSummary, TransactionSummary has access to the actual Transaction itself when being constructed, and the implementation details for a Transaction actually has access to its NamespaceId, then we can make this work by creating a trait for the Transaction itself to retrieve its own NamespaceId.
So, we need to remove namespace_ids_for_offset, and create a new trait for a Transaction for use with the Explorer API, that allows us to retrieve the NamespaceId from the transaction itself.
The method
namespace_ids_for_offset
is intended to get a list ofNamespaceId
s for a given Transaction offset on a Block Header. Considering implementation details the Block Header doesn't actually have access to this information, based on the discussion here: https://github.com/EspressoSystems/espresso-sequencer/pull/1428#discussion_r1596717521.Since this
method
is only utilized forTransactionSummary
,TransactionSummary
has access to the actualTransaction
itself when being constructed, and the implementation details for aTransaction
actually has access to itsNamespaceId
, then we can make this work by creating atrait
for theTransaction
itself to retrieve its ownNamespaceId
.So, we need to remove
namespace_ids_for_offset
, and create a newtrait
for aTransaction
for use with theExplorer API
, that allows us to retrieve theNamespaceId
from the transaction itself.