From 74b510bf30fb0fe223527c6481d87a19bf63cc72 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Fri, 13 Dec 2024 22:11:58 +0800 Subject: [PATCH] revert RawBlockHeader author_auth_key for compatible --- scripts/nextest.sh | 1 - types/src/block/mod.rs | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/nextest.sh b/scripts/nextest.sh index 83c0f70874..f908742d89 100755 --- a/scripts/nextest.sh +++ b/scripts/nextest.sh @@ -22,7 +22,6 @@ cargo nextest -V >/dev/null 2>&1 || cargo install cargo-nextest --version "0.9.5 # --retries 2, a correct test case usually takes no more than 3 tries to pass # --build-jobs 8, a little (~20s) faster than 5 or 10 build jobs cargo nextest run --workspace \ ---exclude starcoin-consensus \ -E 'not (test(block_connector::test_write_dag_block_chain::test_block_dag_chain_switch_main)) and not (test(block_connector::test_write_dag_block_chain::test_full_sync_continue)) and not (test(tasks::tests::test_full_sync_continue)) and not (test(tasks::tests::test_full_sync_fork)) and not (test(tasks::tests::test_full_sync_fork_from_genesis)) and not (test(tasks::tests::test_full_sync_new_node)) and not (test(tasks::tests::test_sync_block_in_async_connection)) and not (test(tasks::tests_dag::test_continue_sync_dag_blocks)) and not (test(tasks::tests_dag::test_sync_dag_blocks)) and not (test(test_sync_and_notification)) and not (test(block_connector::test_write_dag_block_chain::test_block_dag_chain_switch_main)) and not (test(block_connector::test_illegal_block::test_verify_consensus_failed)) and not (test(tasks::tests::test_full_sync_cancel))' --retries 2 --build-jobs 8 --test-threads 12 --no-fail-fast --failure-output immediate-final diff --git a/types/src/block/mod.rs b/types/src/block/mod.rs index 5a1503731d..c1b5c74975 100644 --- a/types/src/block/mod.rs +++ b/types/src/block/mod.rs @@ -30,6 +30,7 @@ use starcoin_vm_types::account_config::genesis_address; use std::fmt::Formatter; use std::hash::Hash; use std::sync::Mutex; +use starcoin_vm_types::transaction::authenticator::AuthenticationKey; /// Type for block number. pub type BlockNumber = u64; @@ -545,6 +546,7 @@ impl Into for BlockHeader { timestamp: self.timestamp, number: self.number, author: self.author, + author_auth_key: None, accumulator_root: self.txn_accumulator_root, parent_block_accumulator_root: self.block_accumulator_root, state_root: self.state_root, @@ -566,6 +568,9 @@ pub struct RawBlockHeader { pub number: BlockNumber, /// Block author. pub author: AccountAddress, + /// Block author auth key. + /// this field is deprecated + pub author_auth_key: Option, /// The transaction accumulator root hash after executing this block. pub accumulator_root: HashValue, /// The parent block accumulator root hash. @@ -1039,6 +1044,7 @@ impl BlockTemplate { timestamp: self.timestamp, number: self.number, author: self.author, + author_auth_key: None, accumulator_root: self.txn_accumulator_root, parent_block_accumulator_root: self.block_accumulator_root, state_root: self.state_root,