Skip to content

Conversation

@instagibbs
Copy link
Contributor

@instagibbs instagibbs commented Sep 27, 2018

Resolves #420

"-deprecatedrpc=validateaddress",
# Parent chain is looking for its own conf(e.g., bitcoin.conf)
# These are not generated or cached during batch functional testing
# so we enter the required lines here
Copy link
Contributor

Choose a reason for hiding this comment

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

This wording is confusing. They are needed, because the generated config files are called elements.conf and bitcoind looks for bitcoin.conf. I didn't understand that out of your explanation :laughing_smiley_with_sweat_drop:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bitcoin.conf isn't generated. What's confusing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I misinterpreted the wording :p Still, since it's in parent_bitcoin == True, "Parent chain is looking for its own conf(e.g., bitcoin.conf)" could be "bitcoind looks for bitcoin.conf, which is not generated..." or something. But nvm, I think I just got confused with the "cached" and looking into the --cachedir for the Travis thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i didnt feel like fixing up this comment if we end up adding more chain support in the future :)

@instagibbs instagibbs changed the title explain port/name/pass duplication in feature_fedpeg.py feature_fedpeg.py bitcoind parent2 uses rpc cookie auth Sep 27, 2018
@instagibbs
Copy link
Contributor Author

@stevenroose completely re-purposed this PR.

Copy link
Contributor

@stevenroose stevenroose left a comment

Choose a reason for hiding this comment

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

Any reason why this is only with Bitcoin parents?

self.extra_args = []
# Parent chain args
for n in range(2):
use_cookie_auth = n==1 and self.options.parent_bitcoin
Copy link
Contributor

Choose a reason for hiding this comment

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

This could in principle be generalized to not only be for bitcoin, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok if we do it for that, we need to intentionally not read the elements.conf, because that would contain user/password entries.

return rv

def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None, chain='elementsregtest'):
def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None, chain='elementsregtest', cookie_auth=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

If generalized to not only be for bitcoin parents, this variable would be unnecessary since it would just be only for n==3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you mean n==1

Copy link
Contributor

@stevenroose stevenroose Sep 28, 2018

Choose a reason for hiding this comment

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

Oh yeah, thought this was about --mainchaincookiestuff, but it's about getting the proxy to connect correctly. Yeah n==1 then.

@instagibbs
Copy link
Contributor Author

ok fine I'll make it work for both, since the test complexity is now causing bugs

@instagibbs
Copy link
Contributor Author

rpc cookie auth now happens for bitcoind or elementsd parent, by having both using a non-existent conf file.

@instagibbs
Copy link
Contributor Author

added a spin-wait for the cookie file, since travis moves a lot slower than my local machine

parent_chain_signblockscript = '51'
for n in range(2):
used_cookie_auth = n==1
rpc_u, rpc_p = rpc_auth_pair(n)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe move these to lines to right before the if used_cookie_auth: line because they are only used in that block afaics.

@stevenroose
Copy link
Contributor

Perfect!
tACK f6528e9

@instagibbs instagibbs merged commit f6528e9 into ElementsProject:elements-0.14.1 Oct 3, 2018
instagibbs added a commit that referenced this pull request Oct 3, 2018
f6528e9 feature_fedpeg.py parent2 uses rpc cookie auth (Gregory Sanders)
f349e17 allow start_node to create/take cookie files (Gregory Sanders)
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.

2 participants