Skip to content

Commit

Permalink
Fix instant seal (#799)
Browse files Browse the repository at this point in the history
* add new function to balances precompile

* fix consesus data provider

* fix babe consensus

* fix block import

* cleanup

* allow insttanteous sltos

* cleanup

* remove auto-insert-keys for manual seal

* cleanup

* fix manual seal

* fmt

* add new action
  • Loading branch information
1xstj authored Nov 1, 2024
1 parent 72783e6 commit 131d1fb
Show file tree
Hide file tree
Showing 12 changed files with 156 additions and 173 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/publish-instant-seal-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Binary

on:
push:
tags:
- '*'

jobs:
build:
name: Publish binaries
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/free-disk-space
- name: Install toolchain
id: toolchain
uses: actions-rs/toolchain@master
with:
profile: minimal
toolchain: nightly
target: wasm32-unknown-unknown

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Install Protobuf
run: sudo apt-get install protobuf-compiler

- name: Build binary
run: cargo build --release -p tangle --locked --features testnet,txpool,manual-seal

- name: Calculate SHA256
run: sha256sum target/release/tangle > target/release/tangle.sha256sum

- name: Upload manual-seal binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle
asset_name: tangle-testnet-manual-seal-linux-amd64
tag: ${{ github.ref }}
overwrite: true

- name: Uplaod SHA256 of the binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle.sha256sum
asset_name: tangle-testnet-manual-seal-linux-amd64.sha256sum
tag: ${{ github.ref }}
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/publish-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
features: [testnet, default, txpool, manual-seal]
features: [testnet, default, txpool]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ rlp = { version = "0.5", default-features = false }
tracing = "0.1.40"
tokio = { version = "1.39" }
futures = { version = "0.3.30" }
futures-timer = { version = "3.0.2" }
rand_core = { version = "0.6", default-features = false }
rand_chacha = { version = "0.3", default-features = false }
rand = { version = "0.8.5", default-features = false }
Expand Down
3 changes: 2 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ tangle-crypto-primitives = { workspace = true }
tangle-primitives = { workspace = true, features = ["std"] }
tangle-runtime = { workspace = true, features = ["std"] }
tangle-testnet-runtime = { workspace = true, optional = true }
futures-timer = { workspace = true }
# sygma-rpc = { workspace = true }
# sygma-runtime-api = { workspace = true }

Expand Down Expand Up @@ -143,4 +144,4 @@ testnet = ["tangle-testnet-runtime"]
txpool = ["fc-rpc/txpool"]
fast-runtime = ["tangle-testnet-runtime/fast-runtime", "tangle-runtime/fast-runtime"]
metadata-hash = ["tangle-testnet-runtime?/metadata-hash", "tangle-runtime/metadata-hash"]
manual-seal = []
manual-seal = ["tangle-testnet-runtime/manual-seal"]
4 changes: 2 additions & 2 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use crate::{
chainspec,
cli::{Cli, Subcommand},
service::{self, tangle},
service,
};
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use futures::TryFutureExt;
Expand Down Expand Up @@ -236,7 +236,7 @@ pub fn run() -> sc_cli::Result<()> {
}

cmd.run_with_spec::<sp_runtime::traits::HashingFor<Block>,
<tangle::ExecutorDispatch as sc_executor::NativeExecutionDispatch>::ExtendHostFunctions>(Some(
<crate::service::tangle::ExecutorDispatch as sc_executor::NativeExecutionDispatch>::ExtendHostFunctions>(Some(
config.chain_spec,
))
},
Expand Down
Loading

0 comments on commit 131d1fb

Please sign in to comment.