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

fetchSortedMatrixServers$ has a hand rolled parser for YAML #1976

Closed
hackaugusto opened this issue Jul 27, 2020 · 1 comment · Fixed by #2264
Closed

fetchSortedMatrixServers$ has a hand rolled parser for YAML #1976

hackaugusto opened this issue Jul 27, 2020 · 1 comment · Fixed by #2264

Comments

@hackaugusto
Copy link
Contributor

Just like the python client (raiden-network/raiden#6424) the light client has a hand rolled parser:

function yamlListToArray(yml: string): string[] {
// match all strings starting with optional spaces followed by a dash + space
// capturing only the content of the list item, trimming spaces
const reg = /^\s*-\s*(.+?)\s*$/gm;
const results: string[] = [];
let match: RegExpExecArray | null;
while ((match = reg.exec(yml))) {
results.push(match[1]);
}
return results;
}

The fix should be synchronized among both implementations.

@andrevmatos andrevmatos added this to the Product Backlog milestone Jul 27, 2020
@christianbrb christianbrb removed this from the Product Backlog milestone Jul 31, 2020
@palango
Copy link
Contributor

palango commented Oct 15, 2020

After the synapse update this information is now json encoded: https://raw.githubusercontent.com/raiden-network/raiden-service-bundle/master/known_servers/known_servers-production-v1.2.0.json

{
    "active_servers": [
        "transport.mainnet.raiden.anyblock.tools"
    ],
    "all_servers": [
        "transport.mainnet.raiden.anyblock.tools",
        "transport.raiden.dappnode.io",
        "transport.raiden.badgateway.tech",
        "transport.raiden.overdoze.se"
    ]
}

@christianbrb Do we need to update some environment for those changes?

@palango palango self-assigned this Oct 15, 2020
palango added a commit that referenced this issue Oct 15, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
palango added a commit that referenced this issue Oct 15, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
palango added a commit that referenced this issue Oct 15, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
palango added a commit that referenced this issue Oct 15, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
palango added a commit that referenced this issue Oct 15, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
palango added a commit that referenced this issue Oct 16, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
palango added a commit that referenced this issue Oct 16, 2020
This lets us remove our hand-rolled yaml parser and fixes #1976.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants