Handle FFI ownership, CI gates, online-node GC, and threat model - #681
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3 |
There was a problem hiding this comment.
What's different between this commitment and tag v3, I didnt get any info from your PR body
| --exclude rings-snark-extension \ | ||
| check -A unmatched-source advisories licenses bans sources | ||
|
|
||
| miri_core: |
| pub fn deserialize<T>(bytes: &[u8]) -> Result<T> | ||
| where T: DeserializeOwned { | ||
| let (value, remaining) = postcard::take_from_bytes(bytes).map_err(Error::deserialize)?; | ||
| if !remaining.is_empty() { |
There was a problem hiding this comment.
use match here.
return earlier is not good code style
| } | ||
|
|
||
| #[test] | ||
| fn roundtrip_and_size_match() -> std::result::Result<(), Box<dyn StdError>> { |
There was a problem hiding this comment.
a test function, should be named as 'test_blabalbal_blablba'
| Ok(()) | ||
| } | ||
|
|
||
| #[test] |
There was a problem hiding this comment.
bad func name, a test function should be named as 'test_xxxx'
| destination: StorageSyncDestination::PhysicalOwner(Did::from(50u32)), | ||
| data: entries.clone(), | ||
| }); | ||
| let serialized_bytes = bincode::serialized_size(&message).map_err(Error::BincodeSerialize)?; |
There was a problem hiding this comment.
from PR body, i cant see clear reason for removing bincode, you should describe the detail
| } | ||
|
|
||
| fn ensure_overwrite_stamp_after(self, actor: Did, floor: Option<EntryVersion>) -> Result<Self> { | ||
| if self.crdt.register.is_some() { |
There was a problem hiding this comment.
do not do earlier return, bad code style
| ) -> Result<Option<(Encoded, EntryDot)>> { | ||
| let covered_by_compaction = dot.version < floor; | ||
| if covered_by_compaction && removal_values.contains(&value) { | ||
| return Ok(None); |
| value: Encoded, | ||
| dot: EntryDot, | ||
| ) -> Result<Option<(Encoded, EntryDot)>> { | ||
| let covered_by_compaction = dot.version < floor; |
There was a problem hiding this comment.
you can ust match dot.version < floor { true =>xxx, false =? xxx} here, clean and simple
| /// Post: every current visible payload not listed in `removals` is preserved | ||
| /// under the greatest observed register floor, and older tombstone metadata | ||
| /// is pruned by that floor. | ||
| pub fn compact_data(&self, removals: Self, actor: Did) -> Result<Self> { |
There was a problem hiding this comment.
this function is too long and too complex, refine it.
| use chacha20poly1305::ChaCha20Poly1305; | ||
| use chacha20poly1305::Key; | ||
| use chacha20poly1305::Nonce; | ||
| use elliptic_curve::point::AffineCoordinates; |
There was a problem hiding this comment.
Describe why Your choose elliptic_curve instead of libsecp256k1, whats then benifit
Closes #667.
Closes #670.
Closes #651.
Closes #671.
Supersedes #677, #678, #679, and #680.
Summary:
0.17.0across the Rust workspace and npm/browser package so published artifacts report the same version.Swatinem/rust-cachesteps so CI no longer fails before execution when GitHub codeload rate-limits external action downloads.# v3/# v4comments record which upstream tag the SHA came from; the workflow now executes the reviewed commit, not a mutable tag ref.Arcreconstruction with an opaque destructible provider handle, add explicit provider/string free APIs, and update the Python FFI wrapper/tests.Weakregression assertion so provider ownership is actually released.rings-codecbacked bypostcard.rings-codec; old bincode crates remain only where unrelated transitive dependencies still pull them in.third_party/serde-wincodeand root/standalone path patches; refresh root, frontend, dweb, and proof-demo locks so Node/core/browser paths userings-codecwithout vendored serializer code.test_...naming style.Latest local validation after review cleanup:
cargo +nightly-2026-07-02 fmt --allcargo test -p rings-codeccargo test -p rings-core dht::entry::testsEarlier validation on this PR branch:
cargo +nightly fmt --all --checktaplo format --checkgit diff --checkcargo deny --offline --locked --exclude rings-snark --exclude rings-snark-example --exclude rings-snark-extension check -A unmatched-source advisories licenses bans sourcescargo check -p rings-core -p rings-transport -p rings-node --features fficargo check -p rings-snarkcargo test -p rings-codeccargo test -p rings-corecargo test -p rings-core storage::sled::test --features defaultcargo test -p rings-core ecc::tests::test_recover --features defaultcargo test -p rings-core ecc::elgamal::impls::secp256k1 --features defaultcargo test -p rings-node --features ffi ffi_ -- --nocapturecargo test -p rings-node test_processor_create_offer --features node -- --nocapturecargo build -p rings-node --features ffiRINGS_FFI_REQUIRE_LIBRARY=1 /tmp/rings-ffi-venv.3G7LK7/bin/python -m pytest examples/ffi/tests/test_rings_ffi.py -qcargo clippy -p rings-codec -p rings-core -p rings-node -p rings-transport --features ffi --all-targets -- -D warningscargo tree -p rings-codeccargo tree -i bincode@1.3.3(cd frontend && cargo check --target=wasm32-unknown-unknown)(cd examples/dweb && cargo check --target=wasm32-unknown-unknown)(cd examples/proof-demo && cargo check --target=wasm32-unknown-unknown)(cd frontend && cargo test --release --target=wasm32-unknown-unknown webview_node_fetches_page_resources_through_browser_onion_exit -- --nocapture)(local geckodriver exited with SIGKILL before executing tests)npm install --package-lock-only --ignore-scriptsactionlint .github/workflows/qaci.yml .github/workflows/release-build.ymlruby -e 'require "yaml"; ARGV.each { |path| YAML.load_file(path); puts "ok #{path}" }' .github/workflows/qaci.yml .github/workflows/release-build.yml