-
Notifications
You must be signed in to change notification settings - Fork 499
simulators/portal: bump ethportal-api for offer json-rpc changes #1269
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few suggestions. All of them are up to you
🚢
let accept_info = client_a.rpc.offer(target_enr, vec![(target_key.clone(), target_value.encode())]).await.expect("Failed to send offer"); | ||
let mut expected_accept_code_list = AcceptCodeList::new(1).expect("We are making a valid accept code list"); | ||
expected_accept_code_list.set(0, AcceptCode::Accepted); | ||
assert_eq!(accept_info.content_keys, expected_accept_code_list, "Accept code list didn't match expected accept code list {:?} != {:?}", accept_info.content_keys, expected_accept_code_list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_eq!(accept_info.content_keys, expected_accept_code_list, "Accept code list didn't match expected accept code list {:?} != {:?}", accept_info.content_keys, expected_accept_code_list); | |
assert_eq!( | |
accept_info.content_keys, | |
expected_accept_code_list, | |
"AcceptCodeList didn't match expected value", | |
); |
nit: The line is too long, and we don't need to print compared values in assert_eq!
(I think they are always print).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
let accept_info = client_a.rpc.offer(target_enr, vec![(target_key.clone(), target_offer_value.encode())]).await.expect("Failed to send offer"); | ||
let mut expected_accept_code_list = AcceptCodeList::new(1).expect("We are making a valid accept code list"); | ||
expected_accept_code_list.set(0, AcceptCode::Accepted); | ||
assert_eq!(accept_info.content_keys, expected_accept_code_list, "Accept code list didn't match expected accept code list {:?} != {:?}", accept_info.content_keys, expected_accept_code_list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here as well
@@ -10,7 +10,7 @@ alloy-rlp = "0.3.11" | |||
alloy-primitives = "0.8.24" | |||
anyhow = "1.0" | |||
chrono = "0.4" | |||
ethportal-api = { git = "https://github.com/ethereum/trin", rev = "4d605acb22874778f2cebd3b06fea69d1325199d" } | |||
ethportal-api = { git = "https://github.com/ethereum/trin", rev = "f584d6e745b6900e1d7e63fd4814cafeb43c91a9" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about not using git as source and use published version instead?
It would probably not work right now (as we didn't publish new version). But if Mike does it today (he should), it would work.
Up to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will leave it as is, just because we will probably ending up switching it back to git commit in the future.
@@ -223,7 +224,10 @@ dyn_async! { | |||
Err(err) => panic!("Error getting node info: {err:?}"), | |||
}; | |||
|
|||
let _ = client_a.rpc.offer(target_enr, vec![(target_key.clone(), target_value.encode())]).await; | |||
let accept_info = client_a.rpc.offer(target_enr, vec![(target_key.clone(), target_value.encode())]).await.expect("Failed to send offer"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this line also looks a bit too long...
* simulators/ethereum/eest: Update default fixtures, use cache (ethereum#1247) * simulators/portal: update ethportal-api version for testing no union (ethereum#1246) simulators/portal: add changes for testing no union * portal/simulators: state generate the right dummy proof for block number (ethereum#1249) * clients/besu: use JDK instead of JRE for docker builds (ethereum#1250) * clients/erigon: fix build image dockerfile (ethereum#1251) * clients/erigon: Update golang builder version in Dockerfile (ethereum#1252) * add deposit contract address in the nethermind config (ethereum#1254) add deposit contract address for nethermind * clients/nethermind: fix version parsing in dockerfiles (ethereum#1255) chore: fix nethermind client version parsing in dockerfiles * clients/shisui: update image building to go 1.24.1 (ethereum#1257) Signed-off-by: Chen Kai <[email protected]> * simulators/portal: bump ethportal-api to handle updated ping rpc method (ethereum#1258) * clients/shisui: make client start quickly (ethereum#1260) feat: make shisui start immediately * clients: add osaka to client mappers (ethereum#1261) clients: add osaka to client mappers. * clients/shisui: hot fix for the wrong flags (ethereum#1262) * clients/go-ethereum: update geth.sh (ethereum#1266) * simulators/devp2p: add support for portal role in discv5 tests * clients/nimbus-el: add base docker image (ethereum#1263) add: nimbus base image * simulators/ethereum/eest: update consume dockerfiles (ethereum#1259) simulators/ethereum/eest: update consume dockerfiles. * clients/shisui: bump Dockerfile.git go version to 1.24.2 (ethereum#1268) feat:update shisui go version 1.24.2 Signed-off-by: Chen Kai <[email protected]> * simulators/portal: bump ethportal-api for offer json-rpc changes (ethereum#1269) * simulators/portal: bump ethportal-api to fix 2 year old bug with offer response (ethereum#1271) * simulators/portal: add test for if GetContent checks locally (ethereum#1170) * simulators/portal: remove history trin bridge test suite (ethereum#1274) * clients/ultralight: expose git commit hash as version.txt for use in hiveview (ethereum#1275) * clients/ethereumjs: Update Dockerfile (ethereum#1273) * Update ethereumjs Dockerfile * Update client directory path name * feat: enable beacon subnetwork for trin client and in portal simulators (ethereum#1278) * clients/besu: add system contracts to mapper (ethereum#1279) * simulators/portal: bump ethportal-api to fix state tests (ethereum#1281) * simulators/portal: update history tests to use new test data format (ethereum#1283) * simulators/portal: initialize clients during history tests with HistoricalSummaries (ethereum#1284) * clients/ethrex: adding ethrex (ethereum#1286) * simulators/portal: add flair for prague (ethereum#1287) * simulators/portal: fix off by 1 error in flair calculation (ethereum#1288) * clients/nimbus-portal: name change of fluffy client to nimbus-portal (ethereum#1290) The fluffy client has been renamed to Nimbus Portal client. This commit adapts hive to that name change. * Update length * Revert "Update length" This reverts commit 4734de9. * Updated the other flags --------- Signed-off-by: Chen Kai <[email protected]> Co-authored-by: Mario Vega <[email protected]> Co-authored-by: Kolby Moroz Liebl <[email protected]> Co-authored-by: danceratopz <[email protected]> Co-authored-by: spencer <[email protected]> Co-authored-by: Somnath <[email protected]> Co-authored-by: Rohit Ranjan <[email protected]> Co-authored-by: Chen Kai <[email protected]> Co-authored-by: zhen peng <[email protected]> Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Felix Lange <[email protected]> Co-authored-by: Advaita Saha <[email protected]> Co-authored-by: Scorbajio <[email protected]> Co-authored-by: Milos Stankovic <[email protected]> Co-authored-by: Gabriel-Trintinalia <[email protected]> Co-authored-by: kdeme <[email protected]>
The json-rpc ethereum/portal-network-specs#370 was modified