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

Enable HTTP2 PING for IPA connections #772

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

akoshelev
Copy link
Collaborator

See #758 for details

Testing

Set up PING interval to 1 sec and run IPA locally. All three helpers and RC exchange PING and PING|ACK messages.

No.	Time	Source	Source port	Destination	Destination port	Protocol	Length	Info
4133	3.874738	127.0.0.1	63371	127.0.0.1	3000	HTTP2	93	PING[0], HEADERS[13]: GET /query/0
4134	3.874750	127.0.0.1	63379	127.0.0.1	3002	HTTP2	93	PING[0], HEADERS[11]: GET /query/0
4135	3.874752	127.0.0.1	63378	127.0.0.1	3001	HTTP2	93	PING[0], HEADERS[11]: GET /query/0
4138	3.874894	127.0.0.1	3000	127.0.0.1	63371	HTTP2	73	PING[0]
4139	3.874914	127.0.0.1	3002	127.0.0.1	63379	HTTP2	73	PING[0]
4141	3.874936	127.0.0.1	3001	127.0.0.1	63378	HTTP2	73	PING[0]
8321	5.878426	127.0.0.1	63378	127.0.0.1	3001	HTTP2	93	PING[0], HEADERS[13]: GET /query/0
8322	5.878426	127.0.0.1	63371	127.0.0.1	3000	HTTP2	93	PING[0], HEADERS[15]: GET /query/0
8323	5.878427	127.0.0.1	63379	127.0.0.1	3002	HTTP2	93	PING[0], HEADERS[13]: GET /query/0
8326	5.878548	127.0.0.1	3001	127.0.0.1	63378	HTTP2	73	PING[0]
8327	5.878556	127.0.0.1	3000	127.0.0.1	63371	HTTP2	73	PING[0]
8329	5.878587	127.0.0.1	3002	127.0.0.1	63379	HTTP2	73	PING[0]
13221	9.352283	127.0.0.1	63386	127.0.0.1	3002	HTTP2	306	PING[0], HEADERS[1369]: POST /query/0/step/protocol/binary_validator/malicious_protocol/compute_helper_bits/bit0, HEADERS[1371]: POST /query/0/step/protocol/binary_validator/malicious_protocol/compute_helper_bits/bit0/duplicate_multiply, HEADERS[1373]: POST /query/0/step/protocol/binary_validator/malicious_protocol/compute_helper_bits/bit1
13226	9.352390	127.0.0.1	3002	127.0.0.1	63386	HTTP2	73	PING[0]
13671	9.881534	127.0.0.1	63371	127.0.0.1	3000	HTTP2	93	PING[0], HEADERS[17]: GET /query/0
13672	9.881535	127.0.0.1	63379	127.0.0.1	3002	HTTP2	93	PING[0], HEADERS[15]: GET /query/0
13673	9.881581	127.0.0.1	63378	127.0.0.1	3001	HTTP2	93	PING[0], HEADERS[15]: GET /query/0
13677	9.881699	127.0.0.1	3002	127.0.0.1	63379	HTTP2	73	PING[0]
13678	9.881713	127.0.0.1	3001	127.0.0.1	63378	HTTP2	73	PING[0]
13679	9.881714	127.0.0.1	3000	127.0.0.1	63371	HTTP2	73	PING[0]
17013	12.436822	127.0.0.1	63374	127.0.0.1	3002	HTTP2	188	PING[0], HEADERS[493]: POST /query/0/step/protocol/after_convert_all_bits/malicious_protocol/perform_user_capping/report_level_capping/random_bits_for_comparison/reveal_c
17022	12.436970	127.0.0.1	3002	127.0.0.1	63374	HTTP2	73	PING[0]
17051	12.447835	127.0.0.1	63387	127.0.0.1	3000	HTTP2	188	PING[0], HEADERS[491]: POST /query/0/step/protocol/after_convert_all_bits/malicious_protocol/perform_user_capping/report_level_capping/random_bits_for_comparison/reveal_c
17056	12.448024	127.0.0.1	3000	127.0.0.1	63387	HTTP2	73	PING[0]
17058	12.448063	127.0.0.1	63385	127.0.0.1	3001	HTTP2	188	PING[0], HEADERS[491]: POST /query/0/step/protocol/after_convert_all_bits/malicious_protocol/perform_user_capping/report_level_capping/random_bits_for_comparison/reveal_c
17062	12.448152	127.0.0.1	3001	127.0.0.1	63385	HTTP2	73	PING[0]
22338	14.884162	127.0.0.1	63378	127.0.0.1	3001	HTTP2	93	PING[0], HEADERS[17]: GET /query/0
22339	14.884163	127.0.0.1	63379	127.0.0.1	3002	HTTP2	93	PING[0], HEADERS[17]: GET /query/0
22340	14.884164	127.0.0.1	63371	127.0.0.1	3000	HTTP2	93	PING[0], HEADERS[19]: GET /query/0
22344	14.884292	127.0.0.1	3002	127.0.0.1	63379	HTTP2	73	PING[0]
22345	14.884293	127.0.0.1	3001	127.0.0.1	63378	HTTP2	73	PING[0]
22346	14.884323	127.0.0.1	3000	127.0.0.1	63371	HTTP2	73	PING[0]
22710	15.219734	127.0.0.1	63374	127.0.0.1	3002	HTTP2	173	PING[0], HEADERS[497]: POST /query/0/step/protocol/after_convert_all_bits/malicious_protocol/perform_user_capping/random_bits_for_comparison/reveal_c
22719	15.219891	127.0.0.1	3002	127.0.0.1	63374	HTTP2	73	PING[0]
22726	15.221186	127.0.0.1	63387	127.0.0.1	3000	HTTP2	173	PING[0], HEADERS[495]: POST /query/0/step/protocol/after_convert_all_bits/malicious_protocol/perform_user_capping/random_bits_for_comparison/reveal_c
22730	15.221254	127.0.0.1	3000	127.0.0.1	63387	HTTP2	73	PING[0]
22769	15.237682	127.0.0.1	63385	127.0.0.1	3001	HTTP2	173	PING[0], HEADERS[495]: POST /query/0/step/protocol/after_convert_all_bits/malicious_protocol/perform_user_capping/random_bits_for_comparison/reveal_c
22775	15.237846	127.0.0.1	3001	127.0.0.1	63385	HTTP2	73	PING[0]
28037	19.887899	127.0.0.1	63371	127.0.0.1	3000	HTTP2	93	PING[0], HEADERS[21]: GET /query/0
28038	19.888147	127.0.0.1	63378	127.0.0.1	3001	HTTP2	93	PING[0], HEADERS[19]: GET /query/0
28039	19.888193	127.0.0.1	63379	127.0.0.1	3002	HTTP2	93	PING[0], HEADERS[19]: GET /query/0
28042	19.888319	127.0.0.1	3000	127.0.0.1	63371	HTTP2	73	PING[0]
28044	19.888391	127.0.0.1	3001	127.0.0.1	63378	HTTP2	73	PING[0]
28051	19.888608	127.0.0.1	3002	127.0.0.1	63379	HTTP2	73	PING[0]

Comment on lines +491 to +494
assert_config_eq(
r#"{ "http_config": { "version": "http1" } }"#,
&ClientConfig::use_http1(),
);
Copy link
Member

Choose a reason for hiding this comment

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

And if you get { "version": "http1", "ping_interval_secs": "100" }, what then?

Copy link
Collaborator Author

@akoshelev akoshelev Aug 10, 2023

Choose a reason for hiding this comment

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

we get a runtime error. I added a test to validate this behaviour

src/serde/mod.rs Outdated
@@ -0,0 +1,43 @@
//! Serialization helpers for Serde
Copy link
Member

Choose a reason for hiding this comment

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

why make a directory with a single "mod.rs" and not just "serde.rs"?

@akoshelev akoshelev merged commit a02ffd9 into private-attribution:main Aug 10, 2023
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.

2 participants