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

Get initial fee policy from the network (Jörmungandr) #473

Merged
merged 5 commits into from
Jun 25, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Jun 25, 2019

Issue Number

#358

Overview

  • I have extended the JormungandrLayer to fetch the initial fee configuration from the network. In the long run, we may change this endpoint to fetch more configuration parameters as we see fit.

  • I have used the new endpoint above during the integration tests setup to retrieve the fee policy from the genesis file instead of using a hard-coded one.

  • I have renamed and relocated cardanoPolicy to byronFeePolicy in the http-bridge package

Comments

@KtorZ KtorZ requested a review from Anviking June 25, 2019 13:54
@KtorZ KtorZ self-assigned this Jun 25, 2019
Copy link
Member

@Anviking Anviking left a comment

Choose a reason for hiding this comment

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

Lgtm!

getLinearFee :: Get FeePolicy
getLinearFee = label "getFeePolicy" $ do
a <- getWord64be
b <- getWord64be
Copy link
Member

@Anviking Anviking Jun 25, 2019

Choose a reason for hiding this comment

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

I think it's a shame to lose the documentation of what the first and second number represent when reading this file, by naming them a and b 🤷‍♂ If you still prefer a and b, I'm fine with it though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, they are coefficient in a linear equation, which are usually called a and b, that's why. We could be more verbose though I agree.

@KtorZ KtorZ merged commit 125f95d into master Jun 25, 2019
@KtorZ KtorZ deleted the KtorZ/jormungandr-fee-policy-from-network branch June 25, 2019 18:18
@KtorZ KtorZ added this to the Jörmungandr Integration Testing milestone Jul 2, 2019
@KtorZ KtorZ mentioned this pull request Jul 4, 2019
3 tasks
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