Skip to content

Conversation

@GarryFCR
Copy link
Collaborator

No description provided.

LYC386 and others added 6 commits December 10, 2025 21:09
* Fixed-point and integer operations
* division by constants, 
* preprocessing-storage traits
* testing
This commit combines three PRs previously reviewed separately:
  1. avoid premature clearing of messages
  2. some testing improvements
  3. some input improvements

In more detail:

1.
- See STO-177.

2.
- better Debug impl for SessionId
- avoid premature dropping of receivers
	- the same problem as STO-38.
- avoid premature dropping of receiver
	- See STO-176.
- make program exit on panic in any thread
- add preprocessing_e2e test with BadFakeNetwork

3.
- allow InputServer::init to be called before InputServer::input_handler
- remove storage for random shares
- only send masked inputs when reconstruction of random values has succeeded
  for the first time to avoid sending them multiple times
- do not store more messages than 2t+1 to prevent a malicious node
  from spoofing sender IDs to act as if more nodes were sending random shares
- add InputServer::wait_for_all_inputs, which either waits a given duration
  and then fails, or returns all inputs if they have arrived in this time;
  the previous solution used less encapsulation and always waited a fixed
  amount of time with no possibility to continue earlier
- use one lock per InputClient instead of multiple
- add some documentation
This commit combines three PRs previously reviewed separately:
  1. avoid premature clearing of messages
  2. some testing improvements
  3. some input improvements

In more detail:

1.
- See STO-177.

2.
- better Debug impl for SessionId
- avoid premature dropping of receivers
	- the same problem as STO-38.
- avoid premature dropping of receiver
	- See STO-176.
- make program exit on panic in any thread
- add preprocessing_e2e test with BadFakeNetwork

3.
- allow InputServer::init to be called before InputServer::input_handler
- remove storage for random shares
- only send masked inputs when reconstruction of random values has succeeded
  for the first time to avoid sending them multiple times
- do not store more messages than 2t+1 to prevent a malicious node
  from spoofing sender IDs to act as if more nodes were sending random shares
- add InputServer::wait_for_all_inputs, which either waits a given duration
  and then fails, or returns all inputs if they have arrived in this time;
  the previous solution used less encapsulation and always waited a fixed
  amount of time with no possibility to continue earlier
- use one lock per InputClient instead of multiple
- add some documentation
@GarryFCR GarryFCR requested a review from Mikerah December 16, 2025 07:54
# Conflicts:
#	mpc/src/honeybadger/fpmul/fpmul.rs
#	mpc/src/honeybadger/input/input.rs
#	mpc/src/honeybadger/mod.rs
#	mpc/tests/node_test.rs
self.operations.mul.wait_for_result(session_id, Duration::MAX).await.map_err(HoneyBadgerError::from)
}

async fn rand(&mut self, network: Arc<N>) -> Result<RobustShare<F>, Self::Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are using the existing preprocessing_materials for rand, we'll need to carefully track the usage of rand vs mul to ensure that there are enough preprocessing materials. I would expect some of this functionality to be done on the VM side (cc'ing @gabearro)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea, there will be automatic calculation of the needed amount and yes the approx. number needed will be decided from @gabearro's side

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.

5 participants