Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

lib3h config option #1540

Merged
merged 18 commits into from
Jul 1, 2019
Merged

lib3h config option #1540

merged 18 commits into from
Jul 1, 2019

Conversation

zippy
Copy link
Member

@zippy zippy commented Jun 21, 2019

PR summary

This PR implements the use of Lib3h configuration in core, and stubs out the ability to choose either lib3h or n3h as the p2p networking engine. See: lib3h:#43

Breaking Change: You must add type="n3h" for current config files to work. eg:
e.g. current n3h based configurations need to look something like like:

...

    [network]
    type="n3h"
    bootstrap_nodes = ["wss://192.168.0.11:64519/?a=hkYW7TrZUS1hy-i374iRu5VbZP1sSw2mLxP4TSe_YI1H2BJM3v_LgAQnpmWA_iR1W5k-8_UoA1BNjzBSUTVNDSIcz9UG0uaM"]
    n3h_persistence_path = "/Users/cnorris/.holochain/n3h_persistence"
    networking_config_file = "/Users/cnorris/.holochain/network_config.json"
    n3h_log_level = "d"

changelog

Please check one of the following, relating to the CHANGELOG-UNRELEASED.md

  • this is a code change that effects some consumer (e.g. zome developers) of holochain core so it is added to the CHANGELOG-UNRELEASED.md (linked above), with the format - summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)
  • this is not a code change, or doesn't effect anyone outside holochain core development

@zippy zippy changed the title WIP: Lib3h config lib3h config option Jun 21, 2019
@zippy zippy requested review from ddd-mtl and lucksus June 21, 2019 20:40
Copy link
Contributor

@ddd-mtl ddd-mtl left a comment

Choose a reason for hiding this comment

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

lgtm

net/src/p2p_network.rs Outdated Show resolved Hide resolved
@willemolding
Copy link
Collaborator

willemolding commented Jun 29, 2019

The tests that are failing are these ones

can_get_all_links_of_any_tag_or_type
get_links_with_non_existent_tag_returns_nothing
get_links_with_non_existent_type_returns_nothing

Interestingly these are tests I have had issues with before when I didn't give the test instance a unique network name

test_instance(dna, netname)
                   ^^^^^^^^ - This was not unique

In that case they failed with the exact same timeout errors.

I am wondering if the network name is no longer being handled correctly resulting in conflicting in-memory networks.

@zippy
Copy link
Member Author

zippy commented Jul 1, 2019

That's exactly what I thought, and went and traced through the netname stuff but couldn't find things out of place. An now it looks like things pass. I can't see how your commit could have fixed it.

@zippy zippy merged commit dbb1c4f into develop Jul 1, 2019
@willemolding
Copy link
Collaborator

I'm pretty sure it was using the json! macro incorrectly previously. To my knowledge you can't pass a formatted JSON string into it you have to use their macro/json style. I wonder if this meant that the netname was 'null' in every case

@zippy zippy deleted the lib3h-config branch October 4, 2019 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants