Skip to content

Commit

Permalink
Rework author noting inherent mock and stagelight config (#834)
Browse files Browse the repository at this point in the history
* Stalight config and rework of nimbus author inherent

* remove log

* Update packages/core/src/blockchain/inherent/parachain/nimbus-author-inherent.ts

* fixes

* pr suggestions

---------

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
  • Loading branch information
girazoki and xlc authored Oct 9, 2024
1 parent 97d77eb commit 81066ea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions configs/stagelight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
endpoint: wss://stagelight.tanssi-dev.network
block: ${env.FLASHBOX_BLOCK_NUMBER}
mock-signature-host: true
db: ./tmp/db_mba.sqlite

import-storage:
System:
Account:
- - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: "100000000000000000000000"
Sudo:
Key: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ export class SetNimbusAuthorInherent implements InherentProvider {
if (!parent) throw new Error('parent block not found')

const meta = await parent.meta

if (!meta.tx.authorInherent?.kickOffAuthorshipValidation) {
if (meta.query.authorNoting) {
newBlock
.pushStorageLayer()
.set(
compactHex(meta.query.authorNoting.didSetContainerAuthorData()),
meta.registry.createType('bool', true).toHex(),
)
}
return []
}

Expand Down Expand Up @@ -64,7 +73,6 @@ export class SetNimbusAuthorInherent implements InherentProvider {
.toHex(),
)
}

layer.set(
compactHex(meta.query.authorNoting.didSetContainerAuthorData()),
meta.registry.createType('bool', true).toHex(),
Expand Down

0 comments on commit 81066ea

Please sign in to comment.