Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

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
Collaborator

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants