Skip to content

Add Verifiers to TxDetail #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/ChainwebData/TxDetail.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ data TxDetail = TxDetail
, _txDetail_previousSteps :: Maybe [Text]
, _txDetail_signers :: [Signer]
, _txDetail_sigs :: [Sig]
, _txDetail_verifiers :: Maybe Value
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can do better than this. These verifiers are conceptually similar to signers, so we probably need a Verifier data type and a database table to go with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

While we could indeed consider adding verifiers as a new column to the transactions table, I think there's good reason to keep it in a separate table like the signers table, because there can be multiple verifiers in a given transaction and if one wanted to index by, say, the verifier name, that would be impossible to do via the transactions table.

} deriving (Eq,Show,Generic)

instance ToJSON TxDetail where
Expand Down