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

Send notification on missedBlock, createdBlock and node start and node stop #5290

Closed
shuse2 opened this issue May 4, 2020 · 0 comments · Fixed by #5573
Closed

Send notification on missedBlock, createdBlock and node start and node stop #5290

shuse2 opened this issue May 4, 2020 · 0 comments · Fixed by #5573

Comments

@shuse2
Copy link
Member

shuse2 commented May 4, 2020

Description

  • Create hook for:
    • registered forger missing block
    • registered forger creating block
    • node start
    • node stop
  • Call webhook with the below schema:
// Create block
{ event: “forger:block:created”, time: 134, payload: { height: 1, reward: 10, address: '' } }
// Missed block
{ event: “forger:block:missed”, time: 134, payload: { height: “”, address: '' } }
// Node action
{ event: “forger:node:start”, time: 134, payload: { reason: “” } }
{ event: “forger:node:stop”, time: 134, payload: { reason: “”  } }

User-Agent should be in format of

${plugin-name}/${plugin-version} ${${os.platform()} ${os.release()}; ${os.arch()}${locale}} lisk-framework/${lisk-framework-version}

lisk-framework-forger-plugin/0.1.0 (darwin 19.5.0; x64 en_US.UTF-8) lisk-framework/0.5.0-alpha.0

Motivation

This event is required in order to notify external services about forging related changes.

Acceptance Criteria

  • Add unit tests to check if the hook is fired by each of the registered forgers
  • Check if the webhook is called by registering to the framework
  • Emit all events to webhook if events is empty and filter and emit specific events when specified, ex: events: ['forger:block:missed']

Additional Information

Related issues: #5215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants