Skip to content

Code Cleanup#950

Closed
r-near wants to merge 13 commits intomasterfrom
code-cleanup
Closed

Code Cleanup#950
r-near wants to merge 13 commits intomasterfrom
code-cleanup

Conversation

@r-near
Copy link
Copy Markdown
Contributor

@r-near r-near commented Jun 4, 2025

No description provided.

Comment on lines +18 to +43
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./eth2near
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.86.0
components: clippy, rustfmt
target: wasm32-unknown-unknown

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
./eth2near
cache-on-failure: true
cache-all-crates: true

- name: Run linters
run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all
- name: Check formatting
run: cargo fmt --all -- --check No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 11 months ago

To fix the issue, we will add a permissions block at the root level of the workflow file. This block will explicitly set the permissions to contents: read, which is sufficient for the linting job since it only needs to read the repository's contents. This change ensures that the workflow adheres to the principle of least privilege and avoids granting unnecessary permissions.


Suggested changeset 1
.github/workflows/rust_lint.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml
--- a/.github/workflows/rust_lint.yml
+++ b/.github/workflows/rust_lint.yml
@@ -12,2 +12,5 @@
 
+permissions:
+  contents: read
+
 env:
EOF
@@ -12,2 +12,5 @@

permissions:
contents: read

env:
Copilot is powered by AI and may make mistakes. Always verify output.
r-near added 12 commits June 4, 2025 14:08
* Use BLS host functions

* Update depenedencies

* Switch BLS signature verification to use native host functions

* Update near-sdk dependency and add BLS imports for eth2-client

* Update near-sdk dependency to use git source with legacy and unit-testing features

* Add near-sdk dependency with legacy and unit-testing features

* Fix type conversion of tree_hash_root in compute_signing_root function

* Update error message in eth2-client test panic assertions

* Update near-sdk dependency to use bls-pairing-check branch

* Update error messages in eth2-client unit tests for block hash validation

* Update test panic message and remove unused data log file

* Add Sepolia test data and integration tests for eth2-client contract

* Add fixtures

* Normalize block data

* save

* save

* another save

* Cleanup

* More cleanup

* streaming json

* batching

* save

* hex it and change the block number source

* update blocks

* Add extra fields

* Update blocks

* save

* hashing script

* update script and light client data

* Use uv

* save new light client data

* minor cleanup

* restore test code

* Fix sepolia integration test

* More fixes

* Cleanup

* Revert this change too

* Newline

* Fix merge conflicts
@r-near r-near closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants