@@ -35,69 +35,19 @@ pub trait MosaicRpc {
3535 // ==== Protocol flow.
3636
3737 /// Creates an instance of a tableset game.
38- #[ method( name = "mosaic_createTablesetGame " ) ]
39- fn create_tableset_instance ( & self , config : RpcTablesetConfig ) -> RpcResult < TablesetId > ;
38+ #[ method( name = "mosaic_createGame " ) ]
39+ fn create_game_instance ( & self , config : RpcGameInstanceConfig ) -> RpcResult < TablesetId > ;
4040
4141 /// Gets current info about about a game.
4242 #[ method( name = "mosaic_getGameInfo" ) ]
4343 fn get_game_info ( & self , tsid : TablesetId ) -> RpcResult < GameInfo > ;
4444
45- /// Starts generating the garbler side's commitments.
46- #[ method( name = "mosaic_startGenGarbCommitments" ) ]
47- fn start_generate_game_tableset ( & self , tsid : TablesetId ) -> RpcResult < JobId > ;
48-
49- /// Gets the garbler commitments to send to the verifier.
50- #[ method( name = "mosaic_getGarbCommitments" ) ]
51- fn get_garb_commitments ( & self , tsid : TablesetId ) -> RpcResult < TablesetCommitments > ;
52-
53- /// Provides the tableset commitments from the garbler. Returns the table
54- /// ID's we're choosing to open.
55- #[ method( name = "mosaic_provideGarbTablesetCommitments" ) ]
56- fn provide_garb_commitments (
57- & self ,
58- tsid : TablesetId ,
59- commitments : TablesetCommitments ,
60- ) -> RpcResult < CacChoices > ;
61-
62- /// Provides the CaC choices from the evaluator.
63- #[ method( name = "mosaic_provideEvalCacChoices" ) ]
64- fn provide_eval_cac_choices ( & self , tsid : TablesetId , choices : CacChoices ) -> RpcResult < ( ) > ;
65-
66- /// Gets the tableset seeds for each table according to the previously-
67- /// provided CaC choices.
68- #[ method( name = "mosaic_getCacSeeds" ) ]
69- fn get_cac_seeds ( & self , tsid : TablesetId ) -> RpcResult < CacSeeds > ;
70-
71- /// Provides the evaluator with the garbler's seeds for each table that we
72- /// can verify.
73- #[ method( name = "mosaic_startVerifyGarbCacSeeds" ) ]
74- fn start_verify_garb_cac_seeds ( & self , tsid : TablesetId , seeds : CacSeeds ) -> RpcResult < JobId > ;
75-
76- /// Checks if the we've successfully verified the seeds for the tables we
77- /// opened from the garbler. This means the other tables in the tableset
78- /// are probably okay.
79- #[ method( name = "mosaic_checkVerifyGarbCacSeeds" ) ]
80- fn check_verify_cac_commitments ( & self , tsid : TablesetId ) -> RpcResult < bool > ;
81-
82- /// Starts exporting the unopened tables so that we can provide them to the
83- /// evaluator.
84- #[ method( name = "mosaic_startExportUnopenedTables" ) ]
85- fn start_export_unopened_tables ( & self , tsid : TablesetId ) -> RpcResult < JobId > ;
86-
8745 /// Gets the data for exchanging exported tables.
8846 #[ method( name = "mosaic_getTableExportData" ) ]
8947 fn get_export_data ( & self , tsid : TablesetId ) -> RpcResult < TableExportMeta > ;
9048
9149 // TODO more methods for dealing with exports here?
9250
93- /// Starts downloading exported tables from the provided metadata.
94- #[ method( name = "mosaic_startDownloadTableExport" ) ]
95- fn start_download_table_export (
96- & self ,
97- tsid : TablesetId ,
98- export_meta : TableExportMeta ,
99- ) -> RpcResult < JobId > ;
100-
10151 /// Starts evaluating the tables in the set using the provided inputs.
10252 #[ method( name = "mosaic_startEvalTableset" ) ]
10353 fn start_eval_tableset ( & self , tsid : TablesetId , inputs : TableEvalInputs ) -> RpcResult < JobId > ;
@@ -106,4 +56,8 @@ pub trait MosaicRpc {
10656 /// provided inputs.
10757 #[ method( name = "mosaic_getEvalOutputs" ) ]
10858 fn get_eval_outputs ( & self , tsid : TablesetId ) -> RpcResult < TableEvalOutputs > ;
59+
60+ /// Cleans up a completed game, regardless of its state.
61+ #[ method( name = "mosaic_cleanupGame" ) ]
62+ fn cleanup_game ( & self , tsid : TablesetId ) -> RpcResult < ( ) > ;
10963}
0 commit comments