Skip to content

Comments

refactor: Remove template in favor of an enum for signer#454

Merged
mergify[bot] merged 9 commits intomasterfrom
eftychis-minor-signer
Mar 31, 2020
Merged

refactor: Remove template in favor of an enum for signer#454
mergify[bot] merged 9 commits intomasterfrom
eftychis-minor-signer

Conversation

@eftychis
Copy link
Contributor

Going over the spec plus the identity designs so far, it seems we
shouldn't expect more than 1-2 more request types worst case, if
any. This was discussed with Hans and Enzo at some point last week.

While it makes the construction a bit bulkier it removes the generic
and as a result removes one dependency. Also I think this might make
it easier to modify the trait or future related trait
realizations (implementations).

@eftychis eftychis requested a review from a team as a code owner March 13, 2020 01:20
Going over the spec plus the identity designs so far, it seems we
shouldn't expect more than 1-2 more request types worst case, if
any. This was discussed with Hans and Enzo at some point last week.

While it makes the construction a bit bulkier it removes the generic
and as a result removes one dependency. Also I think this might make
it easier to modify the trait or future related trait
realizations (implementations).
@eftychis eftychis force-pushed the eftychis-minor-signer branch from 902ecf9 to eae811b Compare March 13, 2020 16:01
Comment on lines 32 to 35
// let mut sender = vec![0; 32];
// sender.push(0x02);
// let sender = Blob::from(sender);
// let request_with_sender = MessageWithSender { request, sender };
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this code commented instead of removed and the Bug() above replaced with the new Principal type you just added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm .. Still getting timeouts with using directly serialize_bytes. Let me see what is produced and compare request ids.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-ping. As mentioned, the example #450, also experiences this (You get

AgentError(
#     TimeoutWaitingForResponse,
# )

(which is due to request id calculation not being the same.)
)
In both cases custom serialization seems fine to me (we implement a serializer). I tried both current and the bytes and the blob serializer and for all cases we got a deviation with the handler when we request status. (I will look more onto this perhaps today or Monday and do some tracing and proper debugging; but I am seeing the same behavior in both.)

P.S. Removed the lines showing the problem above.

@eftychis eftychis changed the title Remove template in favor of an enum for signer refactor: Remove template in favor of an enum for signer Mar 20, 2020
@eftychis eftychis requested a review from hansl March 27, 2020 18:10
Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

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

Do we still need the 'a lifetime on sign?

@eftychis
Copy link
Contributor Author

On the top of my head I think it is because of the argument, but let me check.

@mergify mergify bot merged commit 70a38ea into master Mar 31, 2020
@lwshang lwshang deleted the eftychis-minor-signer branch July 29, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants