-
Notifications
You must be signed in to change notification settings - Fork 19
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
Signing node using aggregate signatures #97
Conversation
As discussed, I'm going to pull out the submit endpoints and rework the integration tests, but everything I'll do will be removing code, no more adding. |
doesn't look like it's compilable. Is it working? Should I help clean it up? |
Sorry I rebased then didn't push up my fix. Pushed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid so far, just a few nitpicks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we are moving in a right direction. No objections about design.
Modified the test environment to expose the signing nodes so we can actually test they're signing the right payloads
Please merge this if you're happy with it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the most part, but I'ma continue to see if there's anything that can be improved
pagoda_firebase_audience_id: String, | ||
node_key: ExpandedKeyPair, | ||
signing_state: Arc<RwLock<SigningState>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could just be using a Mutex
instead. There's only been writers to this state, so no need to use RwLock
which is better only if we have readers away from writing logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving as is for now in case we need read-only access. We can clean up later if needed.
This is a working implementation of aggregate signing nodes.
Current issues are that it will merrily sign any payload you send it provided there's an oauth token and it only uses a single key.
It also breaks every integration test we have. Tomorrow morning I'm going to work on integrating it into our existing leader node calling and adding the constraints on what it signs. The test
aggregate_signatures
sketches out how this will look. The leader can be very dumb as all of the validation is done on the signers side.I'd appreciate your feedback, to make sure I'm going in the right direction.