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

Make request IDs unique across clients #4524

Merged
merged 7 commits into from
Jul 17, 2024
Merged

Conversation

nwatson22
Copy link
Member

@nwatson22 nwatson22 commented Jul 16, 2024

Changes the ID fields of the requests being sent to the kore RPC server. Before they were just integers counting up the requests of each client, but it is useful to be able to see in the logs which requests are coming from which client, so this changes the IDs to be this same counter, but prepended with id() of the client that is making the request.

@nwatson22 nwatson22 self-assigned this Jul 16, 2024
@rv-jenkins rv-jenkins changed the base branch from master to develop July 16, 2024 11:53
@nwatson22 nwatson22 requested review from tothtamas28 and geo2a July 16, 2024 14:20
pyk/src/pyk/kore/rpc.py Outdated Show resolved Hide resolved
pyk/src/pyk/kore/rpc.py Outdated Show resolved Hide resolved
@tothtamas28
Copy link
Contributor

@nwatson22, can you post the logs for an example multi-threaded run of kontrol for @PetarMax to check?

Copy link
Contributor

@tothtamas28 tothtamas28 left a comment

Choose a reason for hiding this comment

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

LGTM.

@geo2a, please check if this change is breaking for the Haskell backend testing automation.

@nwatson22
Copy link
Member Author

@tothtamas28 @geo2a Here is a snippet of a run of a kontrol proof. Could you check that this will not break the bug report automation and @PetarMax that the requests are differentiated enough for debugging?

INFO 2024-07-16 13:04:08,476 kontrol.prove - Using setUp method for test: test%AssertTest.test_assert_true():1
INFO 2024-07-16 13:04:08,487 kontrol.prove - Initializing KCFG for test: test%AssertTest.test_assert_true():1
INFO 2024-07-16 13:04:08,518 kontrol.prove - Expanding macros in node 4 for test: test%AssertTest.test_assert_true()
INFO 2024-07-16 13:04:08,691 kontrol.prove - Computing definedness constraint for node 4 for test: test%AssertTest.test_assert_true()
INFO 2024-07-16 13:04:08,710 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-001_request.json: /tmp/tmpngdo75d5
INFO 2024-07-16 13:04:08,714 pyk.utils - Added file to bug report bug-report.tar:sequence/044: /tmp/tmpwtu8ska_
INFO 2024-07-16 13:04:08,714 pyk.kore.rpc - Sending request to localhost:41167: 128834776286160-001 - simplify
INFO 2024-07-16 13:04:09,475 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834776286160-001
INFO 2024-07-16 13:04:10,451 pyk.kore.rpc - Received response from localhost:41167: 128834776286160-001 - simplify
INFO 2024-07-16 13:04:10,455 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-001_response.json: /tmp/tmpc9ym80rt
INFO 2024-07-16 13:04:10,460 pyk.utils - Added file to bug report bug-report.tar:sequence/045: /tmp/tmprgkb7046
INFO 2024-07-16 13:04:10,479 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-002_request.json: /tmp/tmpo4uv5_hv
INFO 2024-07-16 13:04:10,483 pyk.utils - Added file to bug report bug-report.tar:sequence/046: /tmp/tmpzga9fifb
INFO 2024-07-16 13:04:10,483 pyk.kore.rpc - Sending request to localhost:41167: 128834776286160-002 - simplify
INFO 2024-07-16 13:04:10,489 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834776286160-002
INFO 2024-07-16 13:04:12,175 pyk.kore.rpc - Received response from localhost:41167: 128834776286160-002 - simplify
INFO 2024-07-16 13:04:12,180 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-002_response.json: /tmp/tmpx9nb13g_
INFO 2024-07-16 13:04:12,185 pyk.utils - Added file to bug report bug-report.tar:sequence/047: /tmp/tmp_dbs6tuh
INFO 2024-07-16 13:04:12,187 kontrol.prove - Expanding macros in target state for test: test%AssertTest.test_assert_true()
INFO 2024-07-16 13:04:12,188 kontrol.prove - Simplifying KCFG for test: test%AssertTest.test_assert_true()
INFO 2024-07-16 13:04:12,189 pyk.kcfg.explore - Simplifying node test%AssertTest.test_assert_true():1: 1
INFO 2024-07-16 13:04:12,204 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-003_request.json: /tmp/tmp65idbp89
INFO 2024-07-16 13:04:12,209 pyk.utils - Added file to bug report bug-report.tar:sequence/048: /tmp/tmpxjkx1rd8
INFO 2024-07-16 13:04:12,209 pyk.kore.rpc - Sending request to localhost:41167: 128834776286160-003 - simplify
INFO 2024-07-16 13:04:12,214 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834776286160-003
INFO 2024-07-16 13:04:13,970 pyk.kore.rpc - Received response from localhost:41167: 128834776286160-003 - simplify
INFO 2024-07-16 13:04:13,975 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-003_response.json: /tmp/tmp_3mgy2l7
INFO 2024-07-16 13:04:13,979 pyk.utils - Added file to bug report bug-report.tar:sequence/049: /tmp/tmps0d6wj7t
INFO 2024-07-16 13:04:13,986 pyk.kcfg.explore - Simplifying node test%AssertTest.test_assert_true():1: 3
INFO 2024-07-16 13:04:14,002 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-004_request.json: /tmp/tmp0zf9c2mc
INFO 2024-07-16 13:04:14,007 pyk.utils - Added file to bug report bug-report.tar:sequence/050: /tmp/tmpxalziw_m
INFO 2024-07-16 13:04:14,007 pyk.kore.rpc - Sending request to localhost:41167: 128834776286160-004 - simplify
INFO 2024-07-16 13:04:14,013 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834776286160-004
INFO 2024-07-16 13:04:15,783 pyk.kore.rpc - Received response from localhost:41167: 128834776286160-004 - simplify
INFO 2024-07-16 13:04:15,788 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-004_response.json: /tmp/tmp5gogadgt
INFO 2024-07-16 13:04:15,793 pyk.utils - Added file to bug report bug-report.tar:sequence/051: /tmp/tmplyx4vq2h
INFO 2024-07-16 13:04:15,800 pyk.kcfg.explore - Simplifying node test%AssertTest.test_assert_true():1: 4
INFO 2024-07-16 13:04:15,819 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-005_request.json: /tmp/tmp7w62f8ux
INFO 2024-07-16 13:04:15,824 pyk.utils - Added file to bug report bug-report.tar:sequence/052: /tmp/tmp057jbxza
INFO 2024-07-16 13:04:15,824 pyk.kore.rpc - Sending request to localhost:41167: 128834776286160-005 - simplify
INFO 2024-07-16 13:04:15,831 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834776286160-005
INFO 2024-07-16 13:04:18,048 pyk.kore.rpc - Received response from localhost:41167: 128834776286160-005 - simplify
INFO 2024-07-16 13:04:18,053 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-005_response.json: /tmp/tmpfhmwav6u
INFO 2024-07-16 13:04:18,058 pyk.utils - Added file to bug report bug-report.tar:sequence/053: /tmp/tmpcpiemkp2
INFO 2024-07-16 13:04:18,065 pyk.kcfg.explore - Simplifying node test%AssertTest.test_assert_true():1: 5
INFO 2024-07-16 13:04:18,078 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-006_request.json: /tmp/tmpnafrdell
INFO 2024-07-16 13:04:18,083 pyk.utils - Added file to bug report bug-report.tar:sequence/054: /tmp/tmpbo5wyzdv
INFO 2024-07-16 13:04:18,083 pyk.kore.rpc - Sending request to localhost:41167: 128834776286160-006 - simplify
INFO 2024-07-16 13:04:18,089 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834776286160-006
INFO 2024-07-16 13:04:19,822 pyk.kore.rpc - Received response from localhost:41167: 128834776286160-006 - simplify
INFO 2024-07-16 13:04:19,828 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834776298064/128834776286160-006_response.json: /tmp/tmpdeegztty
INFO 2024-07-16 13:04:19,832 pyk.utils - Added file to bug report bug-report.tar:sequence/055: /tmp/tmput4hs271
INFO 2024-07-16 13:04:19,838 pyk.utils - Making directory: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/kcfg
INFO 2024-07-16 13:04:19,838 pyk.utils - Making directory: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/kcfg/nodes
INFO 2024-07-16 13:04:19,839 pyk.kore.rpc - Connecting to host: localhost:41167
INFO 2024-07-16 13:04:19,839 pyk.kore.rpc - Connected to host: localhost:41167
INFO 2024-07-16 13:04:19,869 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834790061152/128834790063408-001_request.json: /tmp/tmpmliocei7
INFO 2024-07-16 13:04:19,874 pyk.utils - Added file to bug report bug-report.tar:sequence/056: /tmp/tmpjmdabzfv
INFO 2024-07-16 13:04:19,874 pyk.kore.rpc - Sending request to localhost:41167: 128834790063408-001 - add-module
INFO 2024-07-16 13:04:19,875 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834790063408-001
INFO 2024-07-16 13:04:22,029 pyk.kore.rpc - Received response from localhost:41167: 128834790063408-001 - add-module
INFO 2024-07-16 13:04:22,034 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834790061152/128834790063408-001_response.json: /tmp/tmp27qrz2t7
INFO 2024-07-16 13:04:22,039 pyk.utils - Added file to bug report bug-report.tar:sequence/057: /tmp/tmpfre2i817
INFO 2024-07-16 13:04:22,066 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834790061152/128834790063408-002_request.json: /tmp/tmp65rdzf75
INFO 2024-07-16 13:04:22,071 pyk.utils - Added file to bug report bug-report.tar:sequence/058: /tmp/tmpcc_ap99n
INFO 2024-07-16 13:04:22,071 pyk.kore.rpc - Sending request to localhost:41167: 128834790063408-002 - add-module
INFO 2024-07-16 13:04:22,075 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834790063408-002
INFO 2024-07-16 13:04:24,282 pyk.kore.rpc - Received response from localhost:41167: 128834790063408-002 - add-module
INFO 2024-07-16 13:04:24,288 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834790061152/128834790063408-002_response.json: /tmp/tmp9rfshc1_
INFO 2024-07-16 13:04:24,294 pyk.utils - Added file to bug report bug-report.tar:sequence/059: /tmp/tmpb0k2paid
INFO 2024-07-16 13:04:24,296 pyk.kore.rpc - Connecting to host: localhost:41167
INFO 2024-07-16 13:04:24,296 pyk.kore.rpc - Connected to host: localhost:41167
INFO 2024-07-16 13:04:24,314 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834623568144/128834650225680-001_request.json: /tmp/tmpg6h0glki
INFO 2024-07-16 13:04:24,320 pyk.utils - Added file to bug report bug-report.tar:sequence/060: /tmp/tmps8_r47wn
INFO 2024-07-16 13:04:24,320 pyk.kore.rpc - Sending request to localhost:41167: 128834650225680-001 - execute
INFO 2024-07-16 13:04:24,326 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834650225680-001
INFO 2024-07-16 13:04:26,342 pyk.kore.rpc - Received response from localhost:41167: 128834650225680-001 - execute
INFO 2024-07-16 13:04:26,348 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834623568144/128834650225680-001_response.json: /tmp/tmphlcjf3bc
INFO 2024-07-16 13:04:26,353 pyk.utils - Added file to bug report bug-report.tar:sequence/061: /tmp/tmp6888rxif
INFO 2024-07-16 13:04:26,360 pyk.kcfg.explore - Extend result for test%AssertTest.test_assert_true():1: basic block at depth 266: 4
INFO 2024-07-16 13:04:26,363 pyk.proof.reachability - Wrote proof data for test%AssertTest.test_assert_true():1: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/proof.json
INFO 2024-07-16 13:04:26,432 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834623568144/128834650225680-002_request.json: /tmp/tmppe8r1sbp
INFO 2024-07-16 13:04:26,438 pyk.utils - Added file to bug report bug-report.tar:sequence/062: /tmp/tmpj6b73q2v
INFO 2024-07-16 13:04:26,438 pyk.kore.rpc - Sending request to localhost:41167: 128834650225680-002 - implies
INFO 2024-07-16 13:04:26,455 pyk.kore.rpc - [PID=1115359][stde] [proxy] Processing request 128834650225680-002
INFO 2024-07-16 13:04:28,896 pyk.kore.rpc - Received response from localhost:41167: 128834650225680-002 - implies
INFO 2024-07-16 13:04:28,904 pyk.utils - Added file to bug report bug-report.tar:test%AssertTest.test_assert_true():1/128834623568144/128834650225680-002_response.json: /tmp/tmp_2k6d40u
INFO 2024-07-16 13:04:28,909 pyk.utils - Added file to bug report bug-report.tar:sequence/063: /tmp/tmpm66lj3vf
INFO 2024-07-16 13:04:28,919 pyk.proof.reachability - Subsumed into target node test%AssertTest.test_assert_true():1: (6, 5)
INFO 2024-07-16 13:04:28,922 pyk.proof.reachability - Wrote proof data for test%AssertTest.test_assert_true():1: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/proof.json
INFO 2024-07-16 13:04:28,928 pyk.proof.reachability - Wrote proof data for test%AssertTest.test_assert_true():1: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/proof.json
INFO 2024-07-16 13:04:28,931 kevm_pyk.utils - Proof status test%AssertTest.test_assert_true():1: ProofStatus.PASSED
INFO 2024-07-16 13:04:28,932 pyk.proof.reachability - Wrote proof data for test%AssertTest.test_assert_true():1: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/proof.json
INFO 2024-07-16 13:04:28,935 pyk.kore.rpc - Stopping KoreServer: 0.0.0.0:41167, pid=1115359
INFO 2024-07-16 13:04:29,040 pyk.kore.rpc - KoreServer stopped: 0.0.0.0:41167, pid=1115359
INFO 2024-07-16 13:04:29,042 pyk.proof.proof - Reading APRProof from file test%AssertTest.test_assert_true_branch(uint256):1: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true_branch(uint256):1/proof.json
INFO 2024-07-16 13:04:29,438 pyk.proof.proof - Reading APRProof from file test%AssertTest.test_assert_true():1: src/tests/integration/test-data/foundry/out/proofs/test%AssertTest.test_assert_true():1/proof.json

@geo2a
Copy link
Contributor

geo2a commented Jul 17, 2024

Thanks @nwatson22 and @tothtamas28! Look good to me. @jberthold could you also have a look at the output above to make sure it's compatible?

@PetarMax
Copy link
Contributor

Yes, this will disambiguate sufficiently in debugging, I think.

Copy link
Member

@jberthold jberthold left a comment

Choose a reason for hiding this comment

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

Thanks @nwatson22 and @tothtamas28! Look good to me. @jberthold could you also have a look at the output above to make sure it's compatible?

LGTM, too, I checked that we only use fromId and not assume the request ID is an Int in our code.

@rv-jenkins rv-jenkins merged commit 2c95ae9 into develop Jul 17, 2024
17 checks passed
@rv-jenkins rv-jenkins deleted the noah/unique-request-id branch July 17, 2024 15:27
rv-jenkins pushed a commit that referenced this pull request Aug 29, 2024
Blocked on:
*  ~#4524~

Since transport-specific files are no longer added to the bug report
(e.g. commands for sending a request), bug report handling can be
performed in the client.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants