Skip to content
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

Generalize Modules to 2 types: ActiveModule and PassiveModule #98

Merged
merged 34 commits into from
Jun 16, 2022

Conversation

matejpavlovic
Copy link
Contributor

@matejpavlovic matejpavlovic commented Jun 14, 2022

This is a very big PR, but each commit should be rather easily digestible.

Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
pkg/clients/signingclienttracker.go Outdated Show resolved Hide resolved
pkg/modules/nullmodule.go Outdated Show resolved Hide resolved
pkg/modules/modules.go Show resolved Hide resolved
node.go Show resolved Hide resolved
workers.go Outdated Show resolved Hide resolved
workers.go Outdated Show resolved Hide resolved
pkg/iss/iss.go Show resolved Hide resolved
@matejpavlovic
Copy link
Contributor Author

I think I addressed all the comments with what I've just pushed. Pls have a look and resolve the conversations if you are happy with the changes. Thanks!

pkg/modules/eventprocessing.go Outdated Show resolved Hide resolved
pkg/modules/eventprocessing.go Show resolved Hide resolved
@xosmig
Copy link
Contributor

xosmig commented Jun 15, 2022

And what about Status()? Have you decided to keep it out of the Module interface?

@matejpavlovic
Copy link
Contributor Author

And what about Status()? Have you decided to keep it out of the Module interface?

Oh yes, I forgot about that. Fixed now.

// Start one concurrent worker for each event in the input list.
// Note that the processing starts concurrently for all events, and only the writing of the results is synchronized.
iter := eventsIn.Iterator()
i := 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The i variable? It is, as each goroutine needs to know the index of its output channels and the Iterator implementation does not provide that information.

@xosmig
Copy link
Contributor

xosmig commented Jun 15, 2022

LGTM

Copy link
Contributor

@sergefdrv sergefdrv left a comment

Choose a reason for hiding this comment

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

That is a massive PR! Good job 👍

pkg/clients/signingclienttracker.go Outdated Show resolved Hide resolved
protos/eventpb/eventpb.proto Show resolved Hide resolved
pkg/deploytest/fakeapp.go Outdated Show resolved Hide resolved
pkg/simplewal/simplewal.go Outdated Show resolved Hide resolved
pkg/iss/iss.go Outdated Show resolved Hide resolved
node.go Outdated Show resolved Hide resolved
node.go Outdated Show resolved Hide resolved
mir_test.go Outdated Show resolved Hide resolved
pkg/deploytest/deployment.go Outdated Show resolved Hide resolved
pkg/modules/modules.go Outdated Show resolved Hide resolved
@matejpavlovic
Copy link
Contributor Author

Ok I think I addressed all the stuff from above that required changes, plus I fixed the problem with the debugger not working.
Please let me know if I forgot anything, otherwise pls resolve the conversations so I can merge the PR. Thanks both for the improvements!

pkg/crypto/api.go Outdated Show resolved Hide resolved
pkg/iss/iss.go Outdated Show resolved Hide resolved
pkg/iss/iss.go Outdated Show resolved Hide resolved
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
@matejpavlovic matejpavlovic force-pushed the general-modules branch 2 times, most recently from 9e6bde8 to 0cb26c7 Compare June 16, 2022 14:01
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Use an explicit definition of the ImplementsModule function
in each Module implementation instead of including the Module interface
as an anonymous field.
This smells less like abusing OO concepts in a non-OO language.

Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
The foreign module names in ISS, currently defined as package-level
variables, are only a temporary measure until these values become part
of the ISS protocol configuration data structure. Until then, they stay
"hard-coded" this way.

Also, the OwnModuleName is renamed to issModuleName
(instead of ownModuleName)

Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
More concretely, in node.go and pkg/deploytest/deployment.go

Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Remove the "key-value store"-like methods for public key management.
If the crypto implementation needs to store public key information,
it should manage the public keys out-of-band.

Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
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.

3 participants