Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into resharding-sync-shards
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelo-gonzalez committed Jan 3, 2025
2 parents f3d9fea + d95855a commit 16aa263
Show file tree
Hide file tree
Showing 92 changed files with 1,816 additions and 1,071 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,25 @@ jobs:
fail_ci_if_error: true
flags: pytests,upgradability,linux

windows_public_libraries_check:
name: "Windows check for building public libraries"
runs-on: "windows-latest"
publishable_packages_check:
name: "Cargo check publishable packages separately"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux
id: linux
os: ubuntu-latest
- name: Windows
id: win
os: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@5ce83af8b5520828f63d83d98df0eea6a66c7978
with:
tool: just
- run: just check_build_public_libraries
- run: just check-publishable-separately
- run: just check-publishable-separately --no-default-features
- run: just check-publishable-separately --all-features
2 changes: 2 additions & 0 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 @@ -321,7 +321,7 @@ rand_hc = "0.3.1"
rand_xorshift = "0.3"
rayon = "1.5"
redis = "0.23.0"
reed-solomon-erasure = "6.0.0"
reed-solomon-erasure = { version = "6.0.0", features = ["simd-accel"] }
regex = "1.7.1"
region = "3.0"
reqwest = { version = "0.11.14", features = ["blocking"] }
Expand Down
10 changes: 7 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ platform_excludes := if os() == "macos" {
}

nightly_flags := "--features nightly,test_features"
public_libraries := "-p near-primitives -p near-crypto -p near-jsonrpc-primitives -p near-chain-configs -p near-primitives-core"

export RUST_BACKTRACE := env("RUST_BACKTRACE", "short")
ci_hack_nextest_profile := if env("CI_HACKS", "0") == "1" { "--profile ci" } else { "" }
Expand Down Expand Up @@ -150,5 +149,10 @@ check-protocol-schema:
env {{protocol_schema_env}} cargo test -p protocol-schema-check --profile dev-artifacts
env {{protocol_schema_env}} cargo run -p protocol-schema-check --profile dev-artifacts

check_build_public_libraries:
cargo check {{public_libraries}}
publishable := "cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.publish == null or (.publish | length > 0)) | .name'"
check-publishable-separately *OPTIONS:
#!/usr/bin/env bash
for pkg in $({{ publishable }}); do
echo "Checking $pkg..."
cargo check -p $pkg {{ OPTIONS }}
done
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

## Reference implementation of NEAR Protocol

![Buildkite](https://img.shields.io/buildkite/0eae07525f8e44a19b48fa937813e2c21ee04aa351361cd851)
[![Buildkite](https://img.shields.io/buildkite/0eae07525f8e44a19b48fa937813e2c21ee04aa351361cd851)][buildkite]
![Stable Status][stable-release]
![Prerelease Status][prerelease]
[![codecov][codecov-badge]][codecov-url]
[![Discord chat][discord-badge]][discord-url]
[![Telegram Group][telegram-badge]][telegram-url]

[buildkite]: https://github.com/near/nearcore/actions
[stable-release]: https://img.shields.io/github/v/release/nearprotocol/nearcore?label=stable
[prerelease]: https://img.shields.io/github/v/release/nearprotocol/nearcore?include_prereleases&label=prerelease
[ci-badge-master]: https://badge.buildkite.com/a81147cb62c585cc434459eedd1d25e521453120ead9ee6c64.svg?branch=master
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/continuous/db/tool/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() -> anyhow::Result<()> {

#[derive(Debug, Parser)]
#[command(
about = "A CLI to interact with the db storing contiuous benchmark data. Commands that connect to the db require the env var DATABASE_URL_CLI to be set in a format compatible with the diesel crate. Consider sourcing the dbprofile file in the repository.",
about = "A CLI to interact with the db storing continuous benchmark data. Commands that connect to the db require the env var DATABASE_URL_CLI to be set in a format compatible with the diesel crate. Consider sourcing the dbprofile file in the repository.",
long_about = None
)]
struct Cli {
Expand Down
2 changes: 1 addition & 1 deletion chain/chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3939,7 +3939,7 @@ impl Chain {
}

/// Function to check whether we need to create a new snapshot while processing the current block
/// Note that this functions is called as a part of block preprocesing, so the head is not updated to current block
/// Note that this functions is called as a part of block preprocessing, so the head is not updated to current block
fn should_make_or_delete_snapshot(&mut self) -> Result<SnapshotAction, Error> {
// head value is that of the previous block, i.e. curr_block.prev_hash
let head = self.head()?;
Expand Down
Loading

0 comments on commit 16aa263

Please sign in to comment.