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

Implement API to get brioche configuration #86

Merged
merged 11 commits into from
May 29, 2024
Merged

Conversation

eomti-wm
Copy link

@eomti-wm eomti-wm commented May 24, 2024

Fixes #77
The implemented API is as follows.

  • Namespace: wemix
  • Methods
    • wemix_briocheConfig
    • wemix_halvingSchedule
    • wemix_getBriocheBlockReward

To expose the Brioche API via the Websocket/HTTP RPC interface, need to add the --http(ws).api "wemix" flag or append "wemix" to Http(Ws)Modules in the node.config.

Closes #77

@eomti-wm eomti-wm linked an issue May 24, 2024 that may be closed by this pull request
@egonspace egonspace changed the base branch from dev to feat/brioche May 24, 2024 02:58
@egonspace
Copy link
Collaborator

egonspace commented May 24, 2024

If we attach a node to the mainnet now and look it up, it comes out as follows.

...
{
      blockReward: 30517578125000,
      endBlock: 1000285370,
      halvingTimes: 15,
      startBlock: 937170171
  }, {
      blockReward: 0,
      endBlock: 1000000000,
      halvingTimes: 16,
      startBlock: 1000285371
  }

But shouldn't it be like this?

...
{
      blockReward: 30517578125000,
      endBlock: 999999999,
      halvingTimes: 15,
      startBlock: 937170171
  }, {
      blockReward: 0,
      endBlock: 0, // ? we must decide the value for infinity block
      halvingTimes: 0, // ??
      startBlock: 1000000000
  }

Copy link
Collaborator

@egonspace egonspace left a comment

Choose a reason for hiding this comment

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

LGTM

@eomti-wm eomti-wm merged commit 05a8ba2 into feat/brioche May 29, 2024
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.

Add API getting brioche configuration
7 participants