Skip to content

Commit

Permalink
Merge branch 'master' into kayagokalp/add-releasy-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx authored Oct 18, 2023
2 parents f08e3f1 + fda4286 commit ff97667
Show file tree
Hide file tree
Showing 41 changed files with 932 additions and 242 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ jobs:
args: --manifest-path version-compatibility/Cargo.toml --workspace
- command: build
args: -p fuel-core-bin --no-default-features --features production

# WASM compatibility checks
- command: check
args: -p fuel-core-types --target wasm32-unknown-unknown --no-default-features
- command: check
args: -p fuel-core-storage --target wasm32-unknown-unknown --no-default-features
- command: check
args: -p fuel-core-client --target wasm32-unknown-unknown --no-default-features
- command: check
args: -p fuel-core-chain-config --target wasm32-unknown-unknown --no-default-features

# disallow any job that takes longer than 45 minutes
timeout-minutes: 45
continue-on-error: ${{ matrix.skip-error || false }}
Expand All @@ -127,6 +138,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
targets: "wasm32-unknown-unknown"
components: "clippy"
- name: Install Cargo Make
uses: davidB/rust-cargo-make@v1
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Description of the upcoming release here.
### Added

- [#1400](https://github.com/FuelLabs/fuel-core/pull/1400): Add releasy beta to fuel-core so that new commits to fuel-core master triggers fuels-rs.
- [#1419](https://github.com/FuelLabs/fuel-core/pull/1419): Add additional "sanity" benchmarks for arithmetic op code instructions.
- [#1411](https://github.com/FuelLabs/fuel-core/pull/1411): Added WASM and `no_std` compatibility
- [#1371](https://github.com/FuelLabs/fuel-core/pull/1371): Add new client function for querying the `MessageStatus` for a specific message (by `Nonce`)
- [#1356](https://github.com/FuelLabs/fuel-core/pull/1356): Add peer reputation reporting to heartbeat code
- [#1355](https://github.com/FuelLabs/fuel-core/pull/1355): Added new metrics related to block importing, such as tps, sync delays etc
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fuel-core-tests = { version = "0.0.0", path = "./tests" }
fuel-core-xtask = { version = "0.0.0", path = "./xtask" }

# Fuel dependencies
fuel-vm-private = { version = "0.38.0", package = "fuel-vm" }
fuel-vm-private = { version = "0.38.0", package = "fuel-vm", default-features = false }

# Common dependencies
anyhow = "1.0"
Expand Down
50 changes: 32 additions & 18 deletions benches/benches/block_target_gas.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use block_target_gas_set::alu::run_alu;
use criterion::{
criterion_group,
criterion_main,
Expand All @@ -13,10 +14,19 @@ use fuel_core::service::{
};
use rand::SeedableRng;

use ethnum::U256;
use fuel_core_benches::*;
use fuel_core_types::{
fuel_asm::{
op,
wideint::{
CompareArgs,
CompareMode,
DivArgs,
MathArgs,
MathOp,
MulArgs,
},
GTFArgs,
Instruction,
RegId,
Expand All @@ -29,6 +39,15 @@ use fuel_core_types::{
fuel_types::AssetId,
};

mod utils;

mod block_target_gas_set;

use utils::{
make_u128,
make_u256,
};

// Use Jemalloc during benchmarks
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
Expand Down Expand Up @@ -72,17 +91,17 @@ fn run(
script.clone().into_iter().collect(),
script_data.clone(),
)
.gas_limit(TARGET_BLOCK_GAS_LIMIT - BASE)
.gas_price(1)
.add_unsigned_coin_input(
SecretKey::random(&mut rng),
rng.gen(),
u64::MAX,
AssetId::BASE,
Default::default(),
Default::default(),
)
.finalize_as_transaction();
.gas_limit(TARGET_BLOCK_GAS_LIMIT - BASE)
.gas_price(1)
.add_unsigned_coin_input(
SecretKey::random(&mut rng),
rng.gen(),
u64::MAX,
AssetId::BASE,
Default::default(),
Default::default(),
)
.finalize_as_transaction();
async move {
let tx_id = tx.id(&config.chain_conf.consensus_parameters.chain_id);

Expand Down Expand Up @@ -116,13 +135,6 @@ fn run(
fn block_target_gas(c: &mut Criterion) {
let mut group = c.benchmark_group("block target estimation");

run(
"Script with noop opcode and infinite loop",
&mut group,
[op::noop(), op::jmpb(RegId::ZERO, 0)].to_vec(),
vec![],
);

run(
"Script with meq opcode and infinite loop",
&mut group,
Expand Down Expand Up @@ -239,6 +251,8 @@ fn block_target_gas(c: &mut Criterion) {
// .to_vec(),
// );

run_alu(&mut group);

group.finish();
}

Expand Down
Loading

0 comments on commit ff97667

Please sign in to comment.