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

Propose new SI Chain Plugin Interface #232

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Warchant
Copy link
Collaborator

@Warchant Warchant commented Nov 17, 2020

Key changes:

  1. submitpop ([atvs], [vtbs], [vbkblocks]) is split on 3 RPCs: submitatv(atv), submitvtb(vtb), submitvbkblock(vbkblock)
  2. Autoconfiguration - use getpopparams RPC to query VBK/BTC networks (test/main), payout delay, altchain id
  3. Best VBK/BTC blocks will NOT be received in getpopdata call. Instead, APM should ALWAYS find a last common block between block known by altchain and real block. This can be done with 2 rpc calls: get{vbk,btc}bestblockhash, then get{vbk,btc}block on best block and previous block(s) until fork block is found.
  4. mine operator will always receive hash instead of height.

suspend fun submitAtvs(atvs: List<AltPublication>) = submit(emptyList(), atvs, emptyList())
/**
* Retrieves mining instruction from the SI chain for the given [blockHash] (or the best block hash
* if [block hash] is null).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* if [block hash] is null).
* if [blockHash] is null).

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