-
Notifications
You must be signed in to change notification settings - Fork 18
Feat/mt resolve deposit tests #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # cargo-audit configuration | ||
| # https://docs.rs/cargo-audit/latest/cargo_audit/config/ | ||
|
|
||
| [advisories] | ||
| # Ignore the lru unsound advisory - it comes from near-vm-runner which is | ||
| # locked to lru ^0.12.3 and cannot be updated to the fixed 0.16.3 version. | ||
| # The advisory relates to IterMut's Stacked Borrows violation, which does | ||
| # not affect our usage as we don't use IterMut directly. | ||
| # Tracked: https://github.com/near/nearcore/issues/XXXXX (upstream) | ||
| ignore = ["RUSTSEC-2026-0002"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,7 @@ jobs: | |
| - name: Run Tests | ||
| env: | ||
| DEFUSE_MIGRATE_FROM_LEGACY: "true" | ||
| run: cargo make run-tests -- --show-output | ||
| run: cargo make run-tests-long -- --show-output | ||
|
|
||
| security_audit_report: | ||
| name: Security Audit - report | ||
|
|
@@ -162,7 +162,8 @@ jobs: | |
| with: | ||
| cache: false | ||
| - name: Install cargo-audit | ||
| run: cargo install cargo-audit --version "^0.21" --locked | ||
| # Require 0.22+ for CVSS 4.0 support (advisory-db now contains CVSS 4.0 entries) | ||
| run: cargo install cargo-audit --version "^0.22" --locked | ||
|
Comment on lines
+165
to
+166
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Locate all cargo-audit installs in the CI file
rg -n "cargo install cargo-audit" .github/workflows/ci.ymlRepository: near/intents Length of output: 168 🏁 Script executed: #!/bin/bash
# Get context around cargo-audit installations and identify which job each belongs to
rg -B 5 "cargo install cargo-audit" .github/workflows/ci.ymlRepository: near/intents Length of output: 589 Align cargo-audit version across audit jobs. The deny job installs ♻️ Suggested update for security_audit_deny- - name: Install Cargo Plugins
- run: cargo install cargo-audit --locked
+ - name: Install Cargo Plugins
+ run: cargo install cargo-audit --version "^0.22" --locked🤖 Prompt for AI Agents |
||
| - uses: rustsec/audit-check@v2.0.0 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -208,6 +208,10 @@ run_task = "run-tests" | |
| command = "cargo" | ||
| args = ["test", "--workspace", "--all-targets", "${@}"] | ||
|
|
||
| [tasks.run-tests-long] | ||
| command = "cargo" | ||
| args = ["test", "--workspace", "--all-targets", "--features=long", "${@}"] | ||
|
Comment on lines
+211
to
+213
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
python - <<'PY'
import glob, pathlib, tomllib
root = pathlib.Path("Cargo.toml")
if not root.exists():
raise SystemExit("Root Cargo.toml not found")
data = tomllib.loads(root.read_text())
members = data.get("workspace", {}).get("members", [])
if not members:
print("No workspace.members found in Cargo.toml")
raise SystemExit(0)
def expand(member):
if any(ch in member for ch in "*?[]"):
return [pathlib.Path(p) for p in glob.glob(member)]
return [pathlib.Path(member)]
missing = []
for m in members:
for path in expand(m):
cargo = path / "Cargo.toml"
if not cargo.exists():
print(f"Missing {cargo}")
continue
pkg = tomllib.loads(cargo.read_text())
features = pkg.get("features", {})
if "long" not in features:
missing.append(str(cargo))
if missing:
print("Packages missing feature 'long':")
print("\n".join(sorted(set(missing))))
else:
print("All workspace packages define feature 'long'")
PYRepository: near/intents Length of output: 726 Fix The command will fail when executed because 32 of 33 workspace members don't define the 🤖 Prompt for AI Agents
mitinarseny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # ============================================================================ | ||
| # Cleanup tasks | ||
| # ============================================================================ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| /// Maximum length of a single log entry in NEAR runtime. | ||
| /// See: <https://github.com/near/nearcore/blob/v2.5.0/runtime/near-vm-runner/src/logic/logic.rs#L42> | ||
| pub const TOTAL_LOG_LENGTH_LIMIT: usize = 16384; | ||
|
Comment on lines
+1
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: "TOTAL_LOG_LENGTH_LIMIT = 16384" is the protocol/runtime limit on the total bytes of emitted logs for a single execution (a contract call/receipt). If a contract's logs exceed this (16,384 bytes) the runtime will fail the call with TotalLogLengthExceeded. This limit appears in the protocol/limit_config as max_total_log_length = 16384. [1][2] Sources:
🌐 Web query:
💡 Result: I couldn't find a specific reference to a "logic.rs" log-length limit in nearcore v2.5.0 from public docs or the nearcore repo with the search terms given. Could you paste the logic.rs snippet or point me to the file/line (GitHub URL or crate path) you mean? With that I can locate the exact limit and explain it. 🌐 Web query:
💡 Result: Summary outline of logic.rs (runtime/near-vm-runner/src/logic/logic.rs) in nearcore v2.5.0 — high-level structure:
Sources / references:
🌐 Web query:
💡 Result: The near-vm-runner crate for nearcore v2.5.0 is at runtime/near-vm-runner in the near/nearcore repo — e.g. GitHub blob path: https://github.com/near/nearcore/tree/v2.5.0/runtime/near-vm-runner. [1][2] Sources:
🌐 Web query:
💡 Result: I tried to fetch that file/line from GitHub but ran into an error accessing the repository file. Do you want me to try again (or paste the file contents here)? 🌐 Web query:
💡 Result: The NEAR protocol specification sets max_total_log_length = 16384 (bytes). [1][2] Sources: 🌐 Web query:
💡 Result: Do you mean NEAR Protocol's runtime (smart contract) log limits/fields — e.g., RPC responses that show "single_log_entry" vs "total_log_length" — or something else (explorer, node logs, or an SDK/runtime API)? If you confirm which NEAR component and where you saw those terms (link or JSON snippet), I’ll look up the exact difference and cite sources. 🌐 Web query:
💡 Result: Short answer: nearcore enforces a maximum of 100 log entries per execution and a maximum total log bytes of 16,384 (i.e. ~16 KiB) across that execution — there is no separate hard limit for a single log entry beyond those totals, so a single log can be as large as the total log budget (subject to UTF‑8 and other limits). [1][2] Sources:
🏁 Script executed: cat -n near-utils/src/event.rs | head -10Repository: near/intents Length of output: 380 Fix documentation: 16384 is the total log length limit per execution, not per single log entry. The constant value (16384 bytes) is correct per NEAR protocol spec, but the documentation comment is misleading. NEAR enforces a maximum of 100 log entries per execution with a combined total of 16,384 bytes — there is no separate hard limit on individual log entry size. Update the comment to clarify this is the total log budget for an entire execution: 🤖 Prompt for AI Agents |
||
|
|
||
| /// Memo used for refund events. | ||
| pub const REFUND_MEMO: &str = "refund"; | ||
|
|
||
| pub trait NearSdkLog { | ||
| fn to_near_sdk_log(&self) -> String; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
RUSTSEC-2026-0002 lru upstream issue github💡 Result:
RUSTSEC-2026-0002 is an unsoundness advisory for the Rust crate
lru: itsIterMut::next/next_backtemporarily create an exclusive reference that violates Stacked Borrows by invalidating an internal pointer held by theHashMap. Affected versions are>= 0.9.0and< 0.16.3; fixed inlru >= 0.16.3. [1][3]Upstream GitHub fix (PR):
Merged January 7, 2026. [1][2]
Related alias:
GHSA-rhfx-m35p-ff5j. [1][3]Sources: [1] [2] [3]
Replace the placeholder upstream issue link with the actual upstream PR.
The ignore note references an
issues/XXXXXplaceholder. Link to the actual upstream fix: jeromefroe/lru-rs#224 (merged January 7, 2026).🤖 Prompt for AI Agents