Skip to content
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

rust upgrade 1.78.0-nightly #4023

Merged
merged 6 commits into from
Jan 29, 2025
Merged

rust upgrade 1.78.0-nightly #4023

merged 6 commits into from
Jan 29, 2025

Conversation

jgreat
Copy link
Contributor

@jgreat jgreat commented Jan 28, 2025

Changes outside of 1.78.0 updates:

  • Remove jobs/thread constraints from CI runs

There are a lot of small changes in 1.78.0

Update curve25519-dalek to"4.1.3" (Security and 1.78.0 changes)

  • Cargo.lock
  • account-keys/Cargo.toml
  • api/Cargo.toml
  • consensus/enclave/trusted/Cargo.lock
  • consensus/service/Cargo.toml
  • core/Cargo.toml
  • core/types/Cargo.toml
  • crypto/digestible/Cargo.toml
  • crypto/keys/Cargo.toml
  • crypto/ring-signature/Cargo.toml
  • crypto/ring-signature/signer/Cargo.toml
  • fog/distribution/Cargo.toml
  • fog/ingest/enclave/trusted/Cargo.lock
  • fog/ledger/enclave/trusted/Cargo.lock
  • fog/view/enclave/trusted/Cargo.lock
  • transaction/builder/Cargo.toml
  • transaction/core/Cargo.toml
  • transaction/extra/Cargo.toml

error: assigning the result of Clone::clone() may be inefficient

https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

  • consensus/enclave/impl/src/lib.rs
  • consensus/scp/src/slot.rs
  • consensus/service/src/byzantine_ledger/pending_values.rs
  • ledger/db/src/mint_config_store.rs
  • mobilecoind-dev-faucet/src/lib.rs

error: assigning the result of ToOwned::to_owned() may be inefficient

https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

  • account-keys/src/identity.rs
  • mobilecoind/src/monitor_store.rs
  • util/build/enclave/src/lib.rs
  • util/build/script/src/cargo_build.rs
  • util/build/sgx/src/edger8r.rs

error: item has both inner and outer attributes

https://rust-lang.github.io/rust-clippy/master/index.html#mixed_attributes_style

  • attest/ake/src/lib.rs
  • fog/sig/authority/src/ristretto.rs
  • fog/sig/report/src/ed25519.rs

error: bound is defined in more than one place

https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations

  • util/serial/src/lib.rs

error: empty doc comment

https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs

  • peers/src/traits.rs

error: unnecessary use of .is_none()

https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  • fog/ingest/server/src/controller.rs

error: direct implementation of ToString

https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl

  • fog/view/server/src/sharding_strategy.rs

error: to_string applied to a type that implements Display in format! args

https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args

  • fog/view/server/test-utils/src/lib.rs

warning: no edition set: defaulting to the 2015 edition while the latest is 2021

  • sgx/types/Cargo.toml

warning: the item is imported redundantly

  • api/src/convert/unsigned_tx.rs
  • api/src/convert/tx_in.rs
  • attest/core/src/ias/verify.rs
  • attest/core/src/types/epid_group_id.rs
  • attest/core/src/types/update_info.rs
  • attest/verifier/src/dcap.rs
  • attest/verifier/types/src/convert/collateral.rs
  • attest/verifier/types/src/convert/dcap_evidence.rs
  • attest/verifier/types/src/convert/quote3.rs
  • consensus/enclave/api/src/config.rs
  • consensus/enclave/impl/src/lib.rs
  • consensus/enclave/src/lib.rs
  • consensus/scp/src/msg.rs
  • consensus/scp/src/predicates.rs
  • consensus/scp/types/src/core_types.rs
  • consensus/service/config/src/network.rs
  • consensus/service/config/src/signer_identity.rs
  • consensus/service/src/api/blockchain_api_service.rs
  • consensus/service/src/api/peer_api_service.rs
  • consensus/service/src/background_work_queue.rs
  • consensus/service/src/background_work_queue.rs
  • consensus/service/src/bin/main.rs
  • consensus/service/src/byzantine_ledger/mod.rs
  • consensus/service/src/byzantine_ledger/worker.rs
  • consensus/service/src/validators.rs
  • core/src/slip10/mod.rs
  • crypto/digestible/test-utils/src/inspect_ast.rs
  • crypto/digestible/test-utils/src/mock_merlin.rs
  • crypto/keys/src/ed25519.rs
  • crypto/keys/src/x25519.rs
  • crypto/noise/src/handshake_hash.rs
  • crypto/ring-signature/src/ring_signature/mlsag.rs
  • fog/ledger/enclave/impl/src/lib.rs
  • fog/ledger/server/src/merkle_proof_service.rs
  • fog/ocall_oram_storage/untrusted/src/lib.rs
  • fog/overseer/server/src/service.rs
  • fog/report/resolver/src/lib.rs
  • fog/sample-paykit/src/client.rs
  • fog/sql_recovery_db/src/bin/fog_sql_recovery_db_migrations.rs
  • fog/sql_recovery_db/src/lib.rs
  • fog/sql_recovery_db/src/test_utils.rs
  • fog/view/protocol/src/user_private.rs
  • fog/view/server/src/db_fetcher.rs
  • fog/view/server/src/shard_responses_processor.rs
  • ledger/db/src/ledger_db.rs
  • ledger/db/src/mint_config_store.rs
  • ledger/db/src/tx_out_store.rs
  • ledger/sync/src/network_state/scp_network_state.rs
  • light-client/verifier/src/config.rs
  • light-client/verifier/src/trusted_validator_set.rs
  • light-client/verifier/src/verifier.rs
  • mobilecoind/src/conversions.rs
  • mobilecoind/src/database.rs
  • mobilecoind/src/monitor_store.rs
  • mobilecoind/src/payments.rs
  • mobilecoind/src/processed_block_store.rs
  • mobilecoind/src/service.rs
  • mobilecoind/src/sync.rs
  • mobilecoind/src/t3_store.rs
  • mobilecoind/src/utxo_store.rs
  • sgx/build/src/edl.rs
  • sgx/sync/src/condvar.rs
  • sgx/sync/src/mutex.rs
  • sgx/sync/src/poison.rs
  • sgx/sync/src/spinlock.rs
  • sgx/types/src/types.rs
  • transaction/builder/src/signed_contingent_input_builder.rs
  • transaction/builder/src/transaction_builder.rs
  • transaction/core/src/fog_hint.rs
  • transaction/core/src/memo.rs
  • transaction/core/src/mint/validation/config.rs
  • transaction/core/src/range_proofs/mod.rs
  • transaction/core/src/ring_ct/rct_bulletproofs.rs
  • transaction/core/src/tx.rs
  • transaction/core/tests/validation.rs
  • transaction/types/src/masked_amount/v1.rs
  • transaction/types/src/masked_amount/v2.rs
  • util/build/script/src/env.rs
  • util/build/sgx/src/edger8r.rs
  • util/grpc/src/admin_service.rs
  • util/grpc/src/auth/mod.rs
  • util/grpc/src/auth/token_authenticator.rs
  • util/keyfile/src/lib.rs
  • util/u64-ratio/src/lib.rs
  • watcher/src/attestation_evidence_collector.rs
  • watcher/src/block_data_store.rs
  • watcher/src/config.rs
  • watcher/src/watcher_db.rs

Best practices for activating std/no_std.

Change from using a not with cfg_attr to set no_std in certain situations -> set #![no_std] and only include std when required. This list includes some use additions that were missing after the change.

  • common/src/lib.rs
  • common/src/logger/loggers/mod.rs
  • common/src/logger/loggers/sentry_logger.rs
  • common/src/logger/loggers/udp_writer.rs
  • common/src/logger/mod.rs
  • common/src/panic_handler.rs
  • consensus/scp/types/src/lib.rs
  • consensus/scp/types/src/quorum_set.rs
  • consensus/scp/types/src/test_utils.rs
  • transaction/builder/src/lib.rs
  • transaction/core/src/encrypted_fog_hint.rs
  • util/encodings/src/lib.rs

Fix comment with unicode chars being confused by doctest

  • attest/verifier/src/dcap.rs

Addition of #[allow(dead_code)] for structs that may be used for future debugging or testing

  • consensus/scp/play/src/main.rs
  • fog/ingest/server/src/lib.rs

Fix broken doctest

  • crypto/keys/src/x25519.rs

Case of trying to cast a non-primitive type

forgot to capture the clippy/compile error

  • ledger/db/src/tx_out_store.rs

Format comments/whitespace in "External" code

This stuff is pretty old, we should look at a larger refactor for maintainability. I don't believe we have to leave it as is, just maintain the attribution/licenses attached.

  • sgx/sync/src/poison.rs
  • sgx/sync/src/spinlock.rs
  • sgx/types/src/types.rs

Flag for more review.

This as_ref() errored with the wrong type (wasn't a slice).

  • transaction/core/src/encrypted_fog_hint.rs:113

clippy/rust-analyzer didn't like the order here

  • transaction/core/src/lib.rs

No longer dead_code?

  • transaction/signer/src/types.rs

Needed another dependency to fix mc-transaction-type tests (proptest_fixtures)

Seems like this has been broken for a while.

  • transaction/types/Cargo.toml
  • transaction/types/src/masked_amount/v1.rs
  • transaction/types/src/masked_amount/v2.rs

Copy link

⚠️ Downstream repo mobilecoinofficial/android-bindings failed to build. Check actions status for details.

Copy link

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

@jgreat
Copy link
Contributor Author

jgreat commented Jan 28, 2025

Copy link
Collaborator

@nick-mobilecoin nick-mobilecoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the dead code is dead code and a couple of suggestions to avoid extern crate std in tests. Normally extern crate std shouldn't be needed for tests, there is an exception for the btree! macro as it's using std when it should be using alloc

util/encodings/src/lib.rs Outdated Show resolved Hide resolved
transaction/signer/src/types.rs Outdated Show resolved Hide resolved
transaction/core/src/lib.rs Outdated Show resolved Hide resolved
fog/ingest/server/src/lib.rs Outdated Show resolved Hide resolved
consensus/scp/types/src/lib.rs Outdated Show resolved Hide resolved
consensus/scp/play/src/main.rs Outdated Show resolved Hide resolved
Copy link

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

Copy link

⚠️ Downstream repo mobilecoinofficial/android-bindings failed to build. Check actions status for details.

@jgreat jgreat merged commit b87ec34 into main Jan 29, 2025
21 checks passed
@jgreat jgreat deleted the jgreat/rust-1-78-0-nightly branch January 29, 2025 20:24
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