Git Product home page Git Product logo

Comments (6)

badkk avatar badkk commented on July 27, 2024 1

@JoshOrndorff I think I've already understand it, thank you so much 😃

from substrate-node-template.

badkk avatar badkk commented on July 27, 2024

I am a new substrate dev, and I found you changed from babe into aura in this pr. So I am curious about this change, and need you guys for more help😂

from substrate-node-template.

JoshOrndorff avatar JoshOrndorff commented on July 27, 2024

There is not currently a doc for that, but the PR you linked is a good place to look. You may also gain insight from this PR that did the same thing upstream in the main Substrate repository. paritytech/substrate#3790

Give it a try, and if you get stuck, link your code. I'm happy to help further. Also feel free to attend Substrate Seminar to talk about this or hack on it together.

from substrate-node-template.

badkk avatar badkk commented on July 27, 2024

Thank you so much for the pr @JoshOrndorff , actually I already refer this code change aura to babe😂.
But I stuck by 1 bug, the reproduce steps are:

  1. Start normally with --dev;
  2. Stop normally and wait for like 10s(1 epoch duration);
  3. Start again and it will shows like this:
2020-01-10 10:07:20 Idle (1 peers), best: #31 (0xb60e…518c), finalized #30 (0xf108…1d38), ⬇ 1.0kiB/s ⬆ 1.0kiB/s
2020-01-10 10:07:24 Starting consensus session on top of parent 0xb60effdb93f2773b9ade15bbb152b3402f68629ff565ebf0a8c40c07a6cc518c
2020-01-10 10:07:24 Prepared block for proposing at 32 [hash: 0x16f77225f419c939ae407f4ab5d5059ac25fb77e5351f718b7f1206bf24575a3; parent_hash: 0xb60e…518c; extrinsics: [0x2113…09a4]]
2020-01-10 10:07:24 Pre-sealed block for proposal at 32. Hash now 0x1a66de6b3b0a3595bd2e8b25e0570d9200b437c7b470ca6c74e3ad0da91c0c50, previously 0x16f77225f419c939ae407f4ab5d5059ac25fb77e5351f718b7f1206bf24575a3.
2020-01-10 10:07:24 Error with block built on 0xb60effdb93f2773b9ade15bbb152b3402f68629ff565ebf0a8c40c07a6cc518c: ClientImport("Expected epoch change to happen at 0x1a66de6b3b0a3595bd2e8b25e0570d9200b437c7b470ca6c74e3ad0da91c0c50, s263103674")

Maybe I am not very familiar with Babe consensus, please enlighten me where should I start with babe+staking runtime pallet?

from substrate-node-template.

badkk avatar badkk commented on July 27, 2024

I found you guys already decouple session from babe, So maybe I need to import session? is there any doc or code I can refer? kusama?

from substrate-node-template.

JoshOrndorff avatar JoshOrndorff commented on July 27, 2024

It's a known issue that if babe nodes are offline for an entire epoch duration, then the chain is bricked. That's why we switched the node template to use aura in the first place.

Actually I guess you already found that issue too. Good work :)

If you want to know more about working with the session pallet, there is this seminar recording where I show some custom code that works with the session pallet.

from substrate-node-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.