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

Improving Documentation #70

Merged
merged 3 commits into from
Aug 20, 2020
Merged

Improving Documentation #70

merged 3 commits into from
Aug 20, 2020

Conversation

gmarcos87
Copy link
Contributor

I want to update the ssb-config but I found some doubts with some values of the configuration.
The options I would like more information about are:

  • config.remote
  • host in the connection>transport

These options I could not find where they are used, maybe they are deprecated or I did not search well

  • config.timers.connection
  • config.timers.reconnect

I also added the options for ssb-party, timers.keepalive and timers.inactivity


Maintenance Grant (%dka5LyifpeWotdE1LxNGmbk1Jtwme0RUlA0LhfM0blQ=.sha256)

@cryptix
Copy link
Member

cryptix commented Jan 17, 2020

config.remote is used by ssb-client to make its server connection. It needs to be a multiserver address.

@cryptix
Copy link
Member

cryptix commented Jan 17, 2020

host in connection should define an IP or hostname that the listener is binding on, IIRC.

@gmarcos87
Copy link
Contributor Author

config.remote is used by ssb-client to make its server connection. It needs to be a multiserver address.

  • remote(string) Multiserver address to connect as a remote client (see ssb-client)

    @cryptix Is that right?

@mixmix
Copy link
Member

mixmix commented Jan 18, 2020

I think the remote thing gets used if it's present, otherwise it gets constructed from some of the other info (this is a vague memory). It's most useful in the case of using ssb-unix-socket + 'ssb-no-auth. Here's an example piece of config used by patchbay (via ssb-ahoy) for example:

    {
      connections: {
        incoming: { unix: [{ scope: 'device', transform: 'noauth', server: true }] }
      },
      remote: `unix:${join(config.path, 'socket')}:~noauth:${pubkey}` // overwrites
    }

this is a kinda advanced use case but is a really nice feature for unix-based systems

README.md Outdated
- `local` *(Boolean)* ... TODO
- `friends` *(Boolean)* ... TODO
- `global` *(Boolean)* ... TODO
- `local` Enable synchronize with random local peers
Copy link
Member

Choose a reason for hiding this comment

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

might be good to specifiy that local means "on the same local network as you"

README.md Outdated
- `global` *(Boolean)* ... TODO
- `local` Enable synchronize with random local peers
- `friends` Establish connections with peers who are friends
- `global` Do not restrict who you connect with.
Copy link
Member

Choose a reason for hiding this comment

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

I think these settings need more clarification.
Like if you set global: true, then does that over-ride local: false? your description here suggests that. I think this is more about making connections with people not on the local network. ... but then I don't know what that "friends" option is about...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, so I made some changes in relation to gossip. I had to read the code to see how the settings affected performance.
I also changed the information about remote, but I still have doubts with the timers, I can't find any code that uses timers.connections and timers.reconnect

@gmarcos87 gmarcos87 changed the title Improving Documentation [WIP] Improving Documentation Jan 20, 2020
README.md Outdated
* `remote` ... TODO ... a multisever address for ... (in the future this may be deprecated / derived from `connections`
__Options__
* `connections` *(object)* Details `incoming` and `outgoing` connections behaviour ([See below](#connections)).
* `remote` *(string)* Multiserver address to connect as a client. Useful in some cases, such as using [ssb-unix-socket](https://github.com/ssbc/ssb-unix-socket) + [ssb-no-auth](https://github.com/ssbc/ssb-no-auth). In the future this may be deprecated / derived from `connections`.
Copy link

Choose a reason for hiding this comment

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

Not sure if this is the right place to mention this (but it has bitten me before), when entering the public key in the multiserver address, you need to make sure you don't have the public key type in there, as otherwise ssb-client will fail with cryptic errors. Most probably a bug, but until it gets fixed, might be good to mention here.

So, the multiserver address has to be something like ws://127.0.0.1:8989~shs:@FlzOOyrhTG+Cl6YND5tReJtd2ufUj3++F0ZsfcPalRc= (missing .ed25519 that seems to be optional in all other places but in a multiserver address)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch @victorb, I added the link to the definition of multiserver address.
The address you were trying (with the key type at the end) is not considered a valid address.

@stale
Copy link

stale bot commented May 6, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the stale label May 6, 2020
@arj03
Copy link
Member

arj03 commented Aug 3, 2020

Anything stopping this from being merged? @gmarcos87

@stale stale bot removed the stale label Aug 3, 2020
@mixmix
Copy link
Member

mixmix commented Aug 3, 2020 via email

@arj03 arj03 merged commit 704bc76 into ssbc:master Aug 20, 2020
@arj03
Copy link
Member

arj03 commented Aug 20, 2020

Alright, did a review and the changes looks good to me. I have made another commit with some minor changes after the merge as this branch was not in this repo.

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.

5 participants