SetMaxRelinSkDeg multiparty mode

I am using multiparty mode, following the example here in the github. I would like to do EvalMultNoRelin for some multiplications and relinearize after, but this appears to only work for a single multiplication. For any other amount of multiplications, no matter how high I set MaxRelinSkDeg, I get the error: Insufficient value was used for maxRelinSkDeg to generate keys for RelinearizeInPlace.

Based on this other discussion thread I found, it seems we need to call cc->EvalMultKeysGen(keyPair.secretKey). However, the multiparty example doesn’t seem to do this and I am guessing this might be the cause of the error?

Any help would be greatly appreciated, thanks!

In the case of multiparty (threshold) FHE, we only generate relinearization keys for MaxRelinSkDeg=2 because otherwise extra communication rounds would be needed during key generation. OpenFHE does not currently support distributed key generation for cases when MaxRelinSkDeg>2. Note that that cited topic was for the single-key case.