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

chore: bump nearcore to 2.4.0 rc.1, Rust toolchain to 1.82.0 #183

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,827 changes: 1,174 additions & 653 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resolver = "2"

[workspace.package]
authors = ["Aurora Labs <hello@aurora.dev>"]
version = "0.29.0-2.3.1"
version = "0.29.0-2.4.0-rc.1"
edition = "2021"
homepage = "https://github.com/aurora-is-near/aurora-standalone"
repository = "https://github.com/aurora-is-near/aurora-standalone"
Expand All @@ -37,9 +37,9 @@ hex = "0.4"
impl-serde = "0.5"
lazy_static = "1"
lru = "0.12"
near-crypto = { git = "https://github.com/near/nearcore", tag = "2.3.1" }
near-indexer = { git = "https://github.com/near/nearcore", tag = "2.3.1" }
near-primitives = { git = "https://github.com/near/nearcore", tag = "2.3.1" }
near-crypto = { git = "https://github.com/near/nearcore", tag = "2.4.0-rc.1" }
near-indexer = { git = "https://github.com/near/nearcore", tag = "2.4.0-rc.1" }
near-primitives = { git = "https://github.com/near/nearcore", tag = "2.4.0-rc.1" }
near-lake-framework = "0.7"
prometheus = "0.13"
rlp = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion refiner-app/src/conversion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn convert(block: StreamerMessage) -> NEARBlock {
.shards
.into_iter()
.map(|shard| Shard {
shard_id: shard.shard_id,
shard_id: shard.shard_id.into(),
chunk: shard.chunk.map(|chunk| ChunkView {
author: ch_json(chunk.author),
header: ChunkHeaderView {
Expand Down
2 changes: 1 addition & 1 deletion refiner-app/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async fn handle_msg(
) -> Result<serde_json::Value, JsonRpcError<String>> {
match msg
.get("method")
.ok_or(JsonRpcError {
.ok_or_else(|| JsonRpcError {
code: -32600,
message: "Invalid Request".into(),
data: Some("no method defined".into()),
Expand Down
5 changes: 3 additions & 2 deletions refiner-lib/src/tx_hash_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ use aurora_refiner_types::{near_block::NEARBlock, near_primitives::hash::CryptoH
use std::path::Path;

/// A helper object for tracking the NEAR transaction hash that caused each NEAR receipt
/// to be produced (potentially indirectly via a number of other receipts). The main interface
/// includes the `get_tx_hash` function to query the helper for the transaction hash associated
/// to be produced (potentially indirectly via a number of other receipts).
///
/// The main interface includes the `get_tx_hash` function to query the helper for the transaction hash associated
/// with a given receipt hash, and two functions to mutate the tracker's state:
/// `consume_near_block` and `on_block_end`. The purpose of `consume_near_block` is to update
/// the tracker's state with the new receipts that are created in that block. The purpose of
Expand Down
5 changes: 3 additions & 2 deletions refiner-types/src/aurora_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ pub struct NearBlockHeader {
pub author: AccountId,
}

/// Similar to Ethereum transaction but only contains information relevant for Aurora. It includes
/// the information of the receipt after executing the transaction as well. In addition it contains
/// Similar to Ethereum transaction but only contains information relevant for Aurora.
///
/// It includes the information of the receipt after executing the transaction as well. In addition it contains
/// extra metadata to map it into a NEAR transaction.
///
/// ## Fields from Ethereum transactions and receipts not included:
Expand Down
3 changes: 3 additions & 0 deletions refiner-types/src/near_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ impl Clone for Shard {
}
StateChangeCauseView::Migration => StateChangeCauseView::Migration,
StateChangeCauseView::ReshardingV2 => StateChangeCauseView::ReshardingV2,
StateChangeCauseView::BandwidthSchedulerStateUpdate => {
StateChangeCauseView::BandwidthSchedulerStateUpdate
}
},
value: match &v.value {
StateChangeValueView::AccountUpdate {
Expand Down
2 changes: 2 additions & 0 deletions refiner-types/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const U64_MAX: U256 = U256([u64::MAX, 0, 0, 0]);

pub mod u64_hex_serde {
//! This module provides serde serialization for u64 numbers with hexadecimal encoding.
//!
//! It can be used with the field attribute `#[serde(with = "u64_hex_serde")]` on u64
//! inside structs deriving serde Serialize and Deserialize traits.
//! Note: if a number is larger than U256::MAX then the deserializing will fail with an error.
Expand Down Expand Up @@ -38,6 +39,7 @@ pub mod u64_hex_serde {

pub mod u128_dec_serde {
//! This module provides serde serialization for optional u128 numbers with base-10 strings.
//!
//! It can be used with the field attribute `#[serde(with = "u128_dec_serde")]` on u128 fields
//! inside structs deriving serde Serialize and Deserialize traits.

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.81.0"
channel = "1.82.0"
components = [ "rustfmt", "clippy" ]
targets = [ "wasm32-unknown-unknown" ]
Loading