diff --git a/Cargo.lock b/Cargo.lock index 6e0a7a6991..386b12f633 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8315,9 +8315,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc-serialize" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" [[package]] name = "rustc_version" diff --git a/Cargo.toml b/Cargo.toml index f7c77352c3..a171783d1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -407,7 +407,7 @@ rpassword = "~5" rust-argon2 = "0.8" rust-embed = "6.3.0" rust-flatten-json = "0.2.0" -rustc-serialize = "^0.3" +rustc-serialize = "0.3.25" rustyline = "9.1.2" rustyline-derive = "0.6.0" sc-peerset = { path = "network-p2p/peerset" } diff --git a/cmd/indexer/src/es_sinker.rs b/cmd/indexer/src/es_sinker.rs index a719e45694..1119692f92 100644 --- a/cmd/indexer/src/es_sinker.rs +++ b/cmd/indexer/src/es_sinker.rs @@ -106,7 +106,7 @@ impl EsSinker { self.create_index_if_not_exists(txn_event_index).await?; self.create_index_if_not_exists(pending_txn_index).await?; let tip = self.get_remote_tip_header().await?; - self.state.write().await.tip = tip.clone(); + self.state.write().await.tip.clone_from(&tip); if let Some(tip_info) = tip { info!( "remote tips: {}, {}", diff --git a/commons/forkable-jellyfish-merkle/src/nibble_path/mod.rs b/commons/forkable-jellyfish-merkle/src/nibble_path/mod.rs index 90e7407987..910fa53cec 100644 --- a/commons/forkable-jellyfish-merkle/src/nibble_path/mod.rs +++ b/commons/forkable-jellyfish-merkle/src/nibble_path/mod.rs @@ -322,7 +322,7 @@ impl<'a> NibbleIterator<'a> { /// Advance both iterators if their next nibbles are the same until either reaches the end or /// the find a mismatch. Return the number of matched nibbles. -pub fn skip_common_prefix<'a, 'b, I1: 'a, I2: 'b>(x: &'a mut I1, y: &mut I2) -> usize +pub fn skip_common_prefix(x: &mut I1, y: &mut I2) -> usize where I1: Iterator + Peekable, I2: Iterator + Peekable, diff --git a/commons/service-registry/src/bus/mod.rs b/commons/service-registry/src/bus/mod.rs index 2d7d730d0e..d4c9dc68b8 100644 --- a/commons/service-registry/src/bus/mod.rs +++ b/commons/service-registry/src/bus/mod.rs @@ -156,9 +156,9 @@ pub trait Bus { where M: Send + Clone + Debug + 'static; - fn broadcast(&self, msg: M) -> Result<(), TrySendError> + fn broadcast(&self, msg: M) -> Result<(), TrySendError> where - M: Send + Clone + Debug; + M: Send + Clone + Debug + 'static; } #[async_trait::async_trait] diff --git a/commons/service-registry/src/handler_proxy.rs b/commons/service-registry/src/handler_proxy.rs index 5f85942b3c..befe179f48 100644 --- a/commons/service-registry/src/handler_proxy.rs +++ b/commons/service-registry/src/handler_proxy.rs @@ -27,6 +27,7 @@ where self.start(ctx) } fn status(&self) -> ServiceStatus; + #[allow(dead_code)] fn as_any(&self) -> &dyn Any; fn as_mut_any(&mut self) -> &mut dyn Any; } diff --git a/config/src/account_provider_config.rs b/config/src/account_provider_config.rs index 5ed072d6ca..25879cb609 100644 --- a/config/src/account_provider_config.rs +++ b/config/src/account_provider_config.rs @@ -49,10 +49,12 @@ impl ConfigModule for AccountProviderConfig { bail!("Account provider conflicts") }; if opt.account_provider.account_dir.is_some() { - self.account_dir = opt.account_provider.account_dir.clone() + self.account_dir + .clone_from(&opt.account_provider.account_dir); } if opt.account_provider.secret_file.is_some() { - self.secret_file = opt.account_provider.secret_file.clone(); + self.secret_file + .clone_from(&opt.account_provider.secret_file); self.account_address = opt.account_provider.account_address; } self.from_env = opt.account_provider.from_env; diff --git a/config/src/account_vault_config.rs b/config/src/account_vault_config.rs index c66e879632..c4208b5153 100644 --- a/config/src/account_vault_config.rs +++ b/config/src/account_vault_config.rs @@ -44,7 +44,7 @@ impl ConfigModule for AccountVaultConfig { fn merge_with_opt(&mut self, opt: &StarcoinOpt, base: Arc) -> Result<()> { self.base = Some(base); if opt.vault.dir.is_some() { - self.dir = opt.vault.dir.clone(); + self.dir.clone_from(&opt.vault.dir); } Ok(()) } diff --git a/config/src/network_config.rs b/config/src/network_config.rs index 4a5ca70330..f7393db847 100644 --- a/config/src/network_config.rs +++ b/config/src/network_config.rs @@ -102,17 +102,21 @@ impl NetworkRpcQuotaConfiguration { pub fn merge(&mut self, o: &Self) -> Result<()> { if o.default_global_api_quota.is_some() { - self.default_global_api_quota = o.default_global_api_quota.clone(); + self.default_global_api_quota + .clone_from(&o.default_global_api_quota); } //TODO should merge two vec? if o.custom_global_api_quota.is_some() { - self.custom_global_api_quota = o.custom_global_api_quota.clone(); + self.custom_global_api_quota + .clone_from(&o.custom_global_api_quota); } if o.default_user_api_quota.is_some() { - self.default_user_api_quota = o.default_user_api_quota.clone(); + self.default_user_api_quota + .clone_from(&o.default_user_api_quota); } if o.custom_user_api_quota.is_some() { - self.custom_user_api_quota = o.custom_user_api_quota.clone(); + self.custom_user_api_quota + .clone_from(&o.custom_user_api_quota); } Ok(()) } @@ -359,7 +363,7 @@ impl NetworkConfig { fn generate_listen_address(&mut self) { if self.listen.is_some() { - self.generate_listen = self.listen.clone(); + self.generate_listen.clone_from(&self.listen); } else { let base = self.base(); let port = if base.net().is_test() || base.net().is_dag_test() { @@ -411,7 +415,7 @@ impl ConfigModule for NetworkConfig { .merge(&opt.network.network_rpc_quotas)?; if opt.network.node_name.is_some() { - self.node_name = opt.network.node_name.clone(); + self.node_name.clone_from(&opt.network.node_name); } if self.node_name.is_none() { @@ -419,11 +423,11 @@ impl ConfigModule for NetworkConfig { } if opt.network.node_key.is_some() { - self.node_key = opt.network.node_key.clone(); + self.node_key.clone_from(&opt.network.node_key); } if opt.network.listen.is_some() { - self.listen = opt.network.listen.clone(); + self.listen.clone_from(&opt.network.listen); } if let Some(m) = opt.network.max_peers_to_propagate { self.max_peers_to_propagate = Some(m); diff --git a/config/src/rpc_config.rs b/config/src/rpc_config.rs index c8d90cfbac..e92f71190c 100644 --- a/config/src/rpc_config.rs +++ b/config/src/rpc_config.rs @@ -90,7 +90,7 @@ impl HttpConfiguration { self.disable = true; } if o.apis.is_some() { - self.apis = o.apis.clone(); + self.apis.clone_from(&o.apis); } if o.port.is_some() { self.port = o.port; @@ -160,7 +160,7 @@ impl TcpConfiguration { self.disable = true; } if o.apis.is_some() { - self.apis = o.apis.clone(); + self.apis.clone_from(&o.apis); } if o.port.is_some() { self.port = o.port; @@ -207,7 +207,7 @@ impl WsConfiguration { self.disable = true; } if o.apis.is_some() { - self.apis = o.apis.clone(); + self.apis.clone_from(&o.apis); } if o.port.is_some() { self.port = o.port; @@ -239,7 +239,7 @@ impl IpcConfiguration { self.disable = true; } if o.apis.is_some() { - self.apis = o.apis.clone(); + self.apis.clone_from(&o.apis); } Ok(()) } @@ -315,17 +315,21 @@ impl ApiQuotaConfiguration { pub fn merge(&mut self, o: &Self) -> Result<()> { if o.default_global_api_quota.is_some() { - self.default_global_api_quota = o.default_global_api_quota.clone(); + self.default_global_api_quota + .clone_from(&o.default_global_api_quota); } //TODO should merge two vec? if o.custom_global_api_quota.is_some() { - self.custom_global_api_quota = o.custom_global_api_quota.clone(); + self.custom_global_api_quota + .clone_from(&o.custom_global_api_quota); } if o.default_user_api_quota.is_some() { - self.default_user_api_quota = o.default_user_api_quota.clone(); + self.default_user_api_quota + .clone_from(&o.default_user_api_quota); } if o.custom_user_api_quota.is_some() { - self.custom_user_api_quota = o.custom_user_api_quota.clone(); + self.custom_user_api_quota + .clone_from(&o.custom_user_api_quota); } Ok(()) } diff --git a/flexidag/src/reachability/inquirer.rs b/flexidag/src/reachability/inquirer.rs index 5a92e91ada..3d3e5dec5f 100644 --- a/flexidag/src/reachability/inquirer.rs +++ b/flexidag/src/reachability/inquirer.rs @@ -219,6 +219,7 @@ pub(super) fn get_next_chain_ancestor_unchecked( enum SearchOutput { NotFound(usize), // `usize` is the position to insert at + #[allow(dead_code)] Found(Hash, usize), } diff --git a/miner/src/create_block_template/mod.rs b/miner/src/create_block_template/mod.rs index 393b980530..392411259f 100644 --- a/miner/src/create_block_template/mod.rs +++ b/miner/src/create_block_template/mod.rs @@ -30,13 +30,6 @@ mod metrics; //#[cfg(test)] //mod test_create_block_template; -#[derive(Debug)] -pub struct GetHeadRequest; - -impl ServiceRequest for GetHeadRequest { - type Response = HashValue; -} - #[derive(Debug)] pub struct BlockTemplateRequest; diff --git a/network-p2p/src/lib.rs b/network-p2p/src/lib.rs index 510ade8bc3..13459c8ffa 100644 --- a/network-p2p/src/lib.rs +++ b/network-p2p/src/lib.rs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 extern crate prometheus; -#[macro_use] extern crate starcoin_metrics; pub use crate::protocol::event::{DhtEvent, Event}; @@ -43,13 +42,3 @@ mod utils; const MAX_CONNECTIONS_PER_PEER: usize = 2; /// The maximum number of concurrent established connections that were incoming. const MAX_CONNECTIONS_ESTABLISHED_INCOMING: u32 = 10_000; - -trait DiscoveryNetBehaviour { - /// Notify the protocol that we have learned about the existence of nodes. - /// - /// Can (or most likely will) be called multiple times with the same `PeerId`s. - /// - /// Also note that there is no notification for expired nodes. The implementer must add a TTL - /// system, or remove nodes that will fail to reach. - fn add_discovered_nodes(&mut self, nodes: impl Iterator); -} diff --git a/network-p2p/src/protocol.rs b/network-p2p/src/protocol.rs index 6088841213..c5115ecf7a 100644 --- a/network-p2p/src/protocol.rs +++ b/network-p2p/src/protocol.rs @@ -6,7 +6,7 @@ use crate::protocol::generic_proto::{GenericProto, GenericProtoOut, Notification // use crate::protocol::message::generic::Status; use crate::business_layer_handle::BusinessLayerHandle; use crate::utils::interval; -use crate::{errors, DiscoveryNetBehaviour, Multiaddr}; +use crate::{errors, Multiaddr}; use bytes::Bytes; use futures::prelude::*; use libp2p::core::connection::ConnectionId; @@ -14,7 +14,7 @@ use libp2p::swarm::behaviour::FromSwarm; use libp2p::swarm::{ConnectionHandler, IntoConnectionHandler}; use libp2p::swarm::{NetworkBehaviour, NetworkBehaviourAction, PollParameters}; use libp2p::PeerId; -use log::Level; +use log::{debug, error, log, trace, warn, Level}; use sc_peerset::{peersstate::PeersState, SetId}; use std::borrow::Cow; use std::collections::{HashMap, HashSet}; @@ -311,17 +311,6 @@ impl NetworkBehaviour for Protocol { } } -impl DiscoveryNetBehaviour for Protocol { - fn add_discovered_nodes(&mut self, peer_ids: impl Iterator) { - for peer_id in peer_ids { - for (set_id, _) in self.notif_protocols.iter().enumerate() { - self.peerset_handle - .add_to_peers_set(SetId::from(set_id), peer_id); - } - } - } -} - impl Protocol { /// Create a new instance. pub fn new( diff --git a/network-p2p/src/protocol/generic_proto.rs b/network-p2p/src/protocol/generic_proto.rs index 2c41d4e145..485a6e9397 100644 --- a/network-p2p/src/protocol/generic_proto.rs +++ b/network-p2p/src/protocol/generic_proto.rs @@ -24,7 +24,7 @@ pub use self::behaviour::{GenericProto, GenericProtoOut}; pub use self::handler::{NotificationsSink, NotifsHandlerError, Ready}; -#[allow(clippy::blocks_in_if_conditions)] +#[allow(clippy::blocks_in_conditions)] mod behaviour; mod handler; mod tests; diff --git a/network-p2p/src/request_responses.rs b/network-p2p/src/request_responses.rs index a917157624..1e1645cf45 100644 --- a/network-p2p/src/request_responses.rs +++ b/network-p2p/src/request_responses.rs @@ -51,6 +51,7 @@ use libp2p::{ handler::multi::MultiHandler, NetworkBehaviour, NetworkBehaviourAction, PollParameters, }, }; +use log::info; pub use network_p2p_types::{ IfDisconnected, InboundFailure, IncomingRequest, OutboundFailure, OutgoingResponse, RequestFailure, ResponseFailure, diff --git a/network-p2p/src/service.rs b/network-p2p/src/service.rs index 59ca81ce41..90f85fe55b 100644 --- a/network-p2p/src/service.rs +++ b/network-p2p/src/service.rs @@ -69,7 +69,7 @@ use libp2p::{ }, PeerId, }; -use log::{error, info, trace, warn}; +use log::{debug, error, info, trace, warn}; use network_p2p_types::IfDisconnected; use parking_lot::Mutex; use sc_peerset::{peersstate, PeersetHandle, ReputationChange}; @@ -79,12 +79,6 @@ use std::num::NonZeroUsize; use std::time::Duration; const REQUEST_RESPONSE_TIMEOUT_SECONDS: u64 = 60 * 5; -/// Minimum Requirements for a Hash within Networking -pub trait ExHashT: std::hash::Hash + Eq + std::fmt::Debug + Clone + Send + Sync + 'static {} - -impl ExHashT for T where T: std::hash::Hash + Eq + std::fmt::Debug + Clone + Send + Sync + 'static -{} - /// A cloneable handle for reporting cost/benefits of peers. #[derive(Clone)] pub struct ReportHandle { @@ -104,8 +98,6 @@ impl From for ReportHandle { pub struct NetworkService { /// Number of peers we're connected to. num_connected: Arc, - /// The local external addresses. - external_addresses: Arc>>, /// Are we actively catching up with the chain? is_major_syncing: Arc, /// Local copy of the `PeerId` of the local node. @@ -324,7 +316,6 @@ impl NetworkWorker { Swarm::add_external_address(&mut swarm, addr.clone(), AddressScore::Infinite); } - let external_addresses = Arc::new(Mutex::new(Vec::new())); let peers_notifications_sinks = Arc::new(Mutex::new(HashMap::new())); let metrics = params @@ -333,7 +324,6 @@ impl NetworkWorker { .and_then(|registry| Metrics::register(registry).ok()); let service = Arc::new(NetworkService { bandwidth, - external_addresses, num_connected, is_major_syncing, peerset: peerset_handle, @@ -885,27 +875,6 @@ impl NetworkService { } } -/// Trait for providing information about the local network state -pub trait NetworkStateInfo { - /// Returns the local external addresses. - fn external_addresses(&self) -> Vec; - - /// Returns the local Peer ID. - fn local_peer_id(&self) -> PeerId; -} - -impl NetworkStateInfo for NetworkService { - /// Returns the local external addresses. - fn external_addresses(&self) -> Vec { - self.external_addresses.lock().clone() - } - - /// Returns the local Peer ID. - fn local_peer_id(&self) -> PeerId { - self.local_peer_id - } -} - /// A `NotificationSender` allows for sending notifications to a peer with a chosen protocol. #[must_use] pub struct NotificationSender { diff --git a/network-p2p/src/service_test.rs b/network-p2p/src/service_test.rs index ba9befaef3..79f64130e1 100644 --- a/network-p2p/src/service_test.rs +++ b/network-p2p/src/service_test.rs @@ -6,13 +6,13 @@ use crate::{ config, config::RequestResponseConfig, protocol::rep, - service::NetworkStateInfo, Event, NetworkConfiguration, NetworkService, NetworkWorker, Params, ProtocolId, }; use anyhow::{Ok, Result}; use bcs_ext::BCSCodec; use futures::{prelude::*, stream::StreamExt}; use libp2p::PeerId; +use log::debug; use network_p2p_types::MultiaddrWithPeerId; use once_cell::sync::Lazy; use sc_peerset::ReputationChange; @@ -160,7 +160,7 @@ fn build_nodes_one_proto() -> ( listen_addresses: vec![], boot_nodes: vec![config::MultiaddrWithPeerId { multiaddr: listen_addr, - peer_id: node1.local_peer_id(), + peer_id: *node1.peer_id(), }], transport: config::TransportConfig::MemoryOnly, ..config::NetworkConfiguration::new_local() @@ -181,7 +181,7 @@ async fn lots_of_incoming_peers_works() { ..config::NetworkConfiguration::new_local() }); - let main_node_peer_id = main_node.local_peer_id(); + let main_node_peer_id = *main_node.peer_id(); // We spawn background tasks and push them in this `Vec`. They will all be waited upon before // this test ends. @@ -241,7 +241,7 @@ async fn notifications_back_pressure() { const TOTAL_NOTIFS: usize = 10_000; let (node1, mut events_stream1, node2, mut events_stream2) = build_nodes_one_proto(); - let node2_id = node2.local_peer_id(); + let node2_id = node2.peer_id(); let receiver = tokio::task::spawn(async move { let mut received_notifications = 0; @@ -278,7 +278,7 @@ async fn notifications_back_pressure() { debug!("Start sending.."); for num in 0..TOTAL_NOTIFS { let notif = node1 - .notification_sender(node2_id, From::from(PROTOCOL_NAME)) + .notification_sender(*node2_id, From::from(PROTOCOL_NAME)) .unwrap(); notif .ready() @@ -526,7 +526,7 @@ async fn test_handshake_fail() { let seed = config::MultiaddrWithPeerId { multiaddr: config1.listen_addresses[0].clone(), - peer_id: service1.local_peer_id(), + peer_id: *service1.peer_id(), }; let config2 = generate_config(vec![seed], vec![PROTOCOL_NAME.into()], vec![]); @@ -625,7 +625,7 @@ async fn test_support_protocol() { let seed = MultiaddrWithPeerId { multiaddr: config1.listen_addresses[0].clone(), - peer_id: service1.local_peer_id(), + peer_id: *service1.peer_id(), }; let config2 = generate_config(vec![seed], vec![block_v1.into()], vec![]); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d3ed9f3240..480124d715 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,4 +2,4 @@ # The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy. # https://rust-lang.github.io/rustup/concepts/profiles.html profile = "default" -channel = "1.75.0" +channel = "1.78.0" diff --git a/storage/src/db_storage/mod.rs b/storage/src/db_storage/mod.rs index a09908a02b..1570d259d1 100644 --- a/storage/src/db_storage/mod.rs +++ b/storage/src/db_storage/mod.rs @@ -62,8 +62,8 @@ impl DBStorage { } if Self::db_exists(path) { let cf_vec = Self::list_cf(path)?; - let mut db_cfs_set: HashSet<_> = cf_vec.iter().collect(); - db_cfs_set.remove(&DEFAULT_PREFIX_NAME.to_string()); + let mut db_cfs_set: HashSet<_> = cf_vec.iter().map(|cf| cf.as_str()).collect(); + db_cfs_set.remove(DEFAULT_PREFIX_NAME); ensure!( db_cfs_set.len() <= cfs_set.len(), StorageInitError::StorageCheckError(format_err!( @@ -74,8 +74,8 @@ impl DBStorage { ); let mut remove_cf_vec = Vec::new(); db_cfs_set.iter().for_each(|k| { - if !cfs_set.contains(&k.as_str()) { - remove_cf_vec.push(<&std::string::String>::clone(k)); + if !cfs_set.contains(k) { + remove_cf_vec.push(k); } }); ensure!( diff --git a/stratum/src/rpc.rs b/stratum/src/rpc.rs index bc0cb90d96..145f2768c4 100644 --- a/stratum/src/rpc.rs +++ b/stratum/src/rpc.rs @@ -117,13 +117,6 @@ pub(crate) struct SubscribeJobEvent( pub(crate) LoginRequest, ); -#[derive(Debug)] -pub(crate) struct Unsubscribe(pub(crate) SubscriptionId); - -impl ServiceRequest for Unsubscribe { - type Response = (); -} - impl ServiceRequest for SubscribeJobEvent { type Response = (); } diff --git a/vm/vm-runtime/src/adapter_common.rs b/vm/vm-runtime/src/adapter_common.rs index 0186986a97..12d7269bb4 100644 --- a/vm/vm-runtime/src/adapter_common.rs +++ b/vm/vm-runtime/src/adapter_common.rs @@ -1,37 +1,19 @@ // Copyright (c) The Starcoin Core Contributors // SPDX-License-Identifier: Apache-2.0 -use crate::move_vm_ext::{MoveResolverExt, SessionId}; +use crate::move_vm_ext::MoveResolverExt; use anyhow::Result; use move_core_types::vm_status::{StatusCode, VMStatus}; -use move_vm_runtime::move_vm_adapter::SessionAdapter; use starcoin_vm_types::state_view::StateView; use starcoin_vm_types::{ block_metadata::BlockMetadata, - transaction::{ - SignatureCheckedTransaction, SignedUserTransaction, Transaction, TransactionOutput, - TransactionStatus, - }, + transaction::{SignedUserTransaction, Transaction, TransactionOutput, TransactionStatus}, write_set::WriteSet, }; use std::collections::BTreeMap; /// TODO: bring more of the execution logic in starcoin_vm into this file. pub trait VMAdapter { - /// Creates a new Session backed by the given storage. - /// TODO: this doesn't belong in this trait. We should be able to remove - /// this after redesigning cache ownership model. - // XXX FIXME YSG, this place we use SessionAdapter, we don't have move_vm_ext::SessionExt - fn new_session<'r, R: MoveResolverExt>( - &self, - remote: &'r R, - session_id: SessionId, - ) -> SessionAdapter<'r, '_, R>; - - /// Checks the signature of the given signed transaction and returns - /// `Ok(SignatureCheckedTransaction)` if the signature is valid. - fn check_signature(txn: SignedUserTransaction) -> Result; - /// TODO: maybe remove this after more refactoring of execution logic. fn should_restart_execution(output: &TransactionOutput) -> bool; diff --git a/vm/vm-runtime/src/starcoin_vm.rs b/vm/vm-runtime/src/starcoin_vm.rs index 8dd0149303..d6bc95004a 100644 --- a/vm/vm-runtime/src/starcoin_vm.rs +++ b/vm/vm-runtime/src/starcoin_vm.rs @@ -1574,18 +1574,6 @@ impl VMExecutor for StarcoinVM { } impl VMAdapter for StarcoinVM { - fn new_session<'r, R: MoveResolverExt>( - &self, - remote: &'r R, - session_id: SessionId, - ) -> SessionAdapter<'r, '_, R> { - self.move_vm.new_session(remote, session_id).into() - } - - fn check_signature(txn: SignedUserTransaction) -> Result { - txn.check_signature() - } - fn should_restart_execution(output: &TransactionOutput) -> bool { // XXX FIXME YSG if GasSchedule.move UpgradeEvent for event in output.events() {