Skip to content

Commit

Permalink
Merge branch 'near:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Longarithm authored Jul 8, 2024
2 parents 3ab52c4 + 41f6554 commit 4116f45
Show file tree
Hide file tree
Showing 726 changed files with 29,188 additions and 13,893 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
rustflags = ["-Cforce-unwind-tables=y"]

[target.'cfg(target_arch = "x86_64")']
rustflags = ["-Ctarget-feature=+sse4.1,+sse4.2", "-Cforce-unwind-tables=y"]
rustflags = ["-Ctarget-feature=+sse2,+ssse3,+sse4.1,+sse4.2,+sha", "-Cforce-unwind-tables=y"]
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
slow-timeout = { period = "60s", terminate-after = 2, grace-period = "0s" }
slow-timeout = { period = "60s", terminate-after = 3, grace-period = "0s" }

[[profile.default.overrides]]
filter = 'test(test_full_estimator)'
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -478,3 +478,14 @@ jobs:
files: py-upgradability.json
fail_ci_if_error: true
flags: pytests,upgradability,linux

windows_public_libraries_check:
name: "Windows check for building public libraries"
runs-on: "windows-latest"
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
with:
tool: just
- run: just check_build_public_libraries
23 changes: 21 additions & 2 deletions .github/workflows/near_crates_publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Near Crates Publish

on:
release:
types: [released]
workflow_dispatch:
inputs:
branch:
Expand All @@ -19,12 +21,31 @@ jobs:

steps:
- name: Checkout near/nearcore's ${{ github.event.inputs.branch }} branch
if: ${{ github.event_name == 'workflow_dispatch'}}
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}

- name: Checkout nearcore repository
if: ${{ github.event_name != 'workflow_dispatch'}}
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up git user
uses: fregante/setup-git-user@v2

- name: Check if version is already published
run: |
PACKAGE_NAME="near-primitives"
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.metadata.workspaces.version')
PUBLISHED=$(curl -s https://crates.io/api/v1/crates/$PACKAGE_NAME/versions | jq -r '.versions[] | select(.num=="'"$VERSION"'") | .num')
if [ "$PUBLISHED" == "$VERSION" ]; then
echo "Version $VERSION of $PACKAGE_NAME is already published."
exit 1
fi
- name: Publish near-workspaces on crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand All @@ -40,5 +61,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push --no-follow-tags https://github.com/near/nearcore.git tag 'crates-*'
20 changes: 17 additions & 3 deletions .github/workflows/neard_custom_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Neard binary image - custom build
on:
# Run when a new release or rc is created

push:
branches:
- statelessnet_master
- statelessnet_latest
workflow_dispatch:
inputs:
release:
Expand Down Expand Up @@ -42,9 +46,19 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set vars for workflow
if: ${{ github.event_name == 'push'}}
run: |
echo "RELEASE_NAME=statelessnet-release" >> $GITHUB_ENV
- name: Set vars for workflow
if: ${{ github.event_name == 'workflow_dispatch'}}
run: |
echo "RELEASE_NAME=${{ github.event.inputs.release }}" >> $GITHUB_ENV
- name: Neard binary build and upload to S3
run: ./scripts/binary_release.sh ${{ github.event.inputs.release }}
run: ./scripts/binary_release.sh ${{ env.RELEASE_NAME }}

- name: Update latest version metadata in S3
run: |
Expand All @@ -54,7 +68,7 @@ jobs:
if [ -z "$BRANCH" ]; then
BRANCH=$(git branch -r --contains=${{ github.ref_name }} | head -n1 | cut -c3- | cut -d / -f 2)
fi
aws s3 cp --acl public-read latest s3://build.nearprotocol.com/nearcore/$(uname)/${BRANCH}/${{ github.event.inputs.release }}/latest
aws s3 cp --acl public-read latest s3://build.nearprotocol.com/nearcore/$(uname)/${BRANCH}/${{ env.RELEASE_NAME }}/latest
docker-release:
name: "Build and publish nearcore Docker image"
Expand Down Expand Up @@ -98,4 +112,4 @@ jobs:
then
docker tag nearcore nearprotocol/nearcore:latest
docker push nearprotocol/nearcore:latest
fi
fi
17 changes: 17 additions & 0 deletions .github/workflows/neard_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ jobs:
fi
aws s3 cp --acl public-read latest s3://build.nearprotocol.com/nearcore/$(uname)/${BRANCH}/latest
- name: Trigger packer image creation workflow
if: github.event_name != 'workflow_dispatch' && github.event_name == 'release'
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
COMMIT=$(git rev-parse HEAD)
BRANCH=$(git branch --show-current)
# in case of Release triggered run, branch is empty
if [ -z "$BRANCH" ]; then
BRANCH=$(git branch -r --contains=${{ github.ref_name }} | head -n1 | cut -c3- | cut -d / -f 2)
fi
curl -L -X POST -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PAGODAPLATFORM_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/PagodaPlatform/pkr-node/dispatches \
-d '{"event_type":"packer-build","client_payload":{"image-name":"near-node-${BRANCH}-${SHORT_SHA}","neard-binary-s3-uri":"s3://build.nearprotocol.com/nearcore/Linux/${BRANCH}/${COMMIT}/neard"}}'
docker-release:
name: "Build and publish nearcore Docker image"
runs-on: "ubuntu-20.04-16core"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ rusty-tags.vi
costs-*.txt
names-to-stats.txt
data_dump_*.bin
.venv
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
## [unreleased]

### Protocol Changes
* Congestion Control [NEP-0539](https://github.com/near/NEPs/pull/539)
* Stateless Validation [NEP-0509](https://github.com/near/NEPs/pull/509)

### Non-protocol Changes

* Enforce rate limits to received network messages [#11617](https://github.com/near/nearcore/issues/11617). Rate limits are configured by default, but they can be overridden through the experimental configuration option `received_messages_rate_limits`.

## 1.40.0

### Protocol Changes
Expand Down
Loading

0 comments on commit 4116f45

Please sign in to comment.