Skip to content

Conversation

@WhoSoup
Copy link
Member

@WhoSoup WhoSoup commented Jun 9, 2020

This PR stems from a behavior of the open node, which sits behind a cloudflare load balancer. The nodes are not synchronized to each other, so making two sequential requests may mean the second request hits a node that has not progressed as far. This behavior can be seen clearly when polling the open node for the "current minute":
https://gist.github.com/WhoSoup/5b23022bea3d2d792c34fc1795975d09

Cloudflare has support for funneling the same client ip to the same instance, though as of today it doesn't seem to be working well. It can also achieve this via use of session cookies.

This PR does two things:

  • Add the option to enable a cookiejar for requests made (factom.EnableCookies()), which uses golang's built in cookie support
  • Add a function to use the open node (factom.SetOpenNode()), which automatically enables cookie support
  • A global constant factom.OpenNode containing the default open node api url

I wasn't sure if it's okay to just enable cookie support by default. Factomd doesn't use them, so it would have no effect

carryforward and others added 2 commits December 11, 2019 09:56
Release the V1 rollup to master.  This is used by factom-walletd version 2.2.16 and some pegnet software
@PaulBernier PaulBernier changed the base branch from master to develop August 15, 2020 01:35
@PaulBernier
Copy link
Contributor

I implemented something similar in factom.js for the same reason :)

@PaulBernier PaulBernier merged commit 77f8d42 into FactomProject:develop Aug 15, 2020
PaulBernier pushed a commit that referenced this pull request Dec 19, 2020
Co-authored-by: Brian Deery <carryforward@users.noreply.github.com>
PaulBernier pushed a commit that referenced this pull request Dec 19, 2020
Co-authored-by: Brian Deery <carryforward@users.noreply.github.com>
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.

3 participants