Skip to content

refactor!: insert metadata directly and remove genesis transactions#1454

Merged
KaoImin merged 4 commits intomainfrom
remove-genesis-transaction
Oct 9, 2023
Merged

refactor!: insert metadata directly and remove genesis transactions#1454
KaoImin merged 4 commits intomainfrom
remove-genesis-transaction

Conversation

@KaoImin
Copy link
Contributor

@KaoImin KaoImin commented Sep 27, 2023

What this PR does / why we need it?

This PR removes the generation of genesis transactions. The first two metadata and the consensus config are inserted to DB directly.

What is the impact of this PR?

No Breaking Change

PR relation:

  • Ref #
CI Settings

CI Usage

Tip: Check the CI you want to run below, and then comment /run-ci.

CI Switch

  • Web3 Compatible Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • v3 Core Tests

CI Description

CI Name Description
Web3 Compatible Test Test the Web3 compatibility of Axon
v3 Core Test Run the compatibility tests provided by Uniswap V3
OCT 1-5 | 6-10 | 11 | 12-15 | 16-19 Run the compatibility tests provided by OpenZeppelin

@KaoImin KaoImin requested a review from a team as a code owner September 27, 2023 07:28
@KaoImin KaoImin requested review from Flouse and chaoticlonghair and removed request for ashuralyk September 27, 2023 07:28
@KaoImin

This comment was marked as off-topic.

@github-actions

This comment was marked as outdated.

Copy link
Contributor

@Flouse Flouse left a comment

Choose a reason for hiding this comment

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

Now the following code is useless, right?

axon/core/run/src/tests.rs

Lines 130 to 147 in f000c0f

for (i, (block_cached, tx)) in genesis
.block
.tx_hashes
.iter()
.zip(genesis.txs.iter())
.enumerate()
{
let tx_cached = tx.transaction.hash;
assert_eq!(
*block_cached, tx_cached,
"check hash of tx[{i}], in-block: {block_cached:#x}, tx-cached: {tx_cached:#x}",
);
let calculated = tx.transaction.clone().calc_hash().hash;
assert_eq!(
tx_cached, calculated,
"check hash of tx[{i}], cached: {tx_cached:#x}, calculated: {calculated:#x}",
);
}

@KaoImin KaoImin force-pushed the remove-genesis-transaction branch from f000c0f to 1df6ee1 Compare October 7, 2023 01:56
@KaoImin
Copy link
Contributor Author

KaoImin commented Oct 7, 2023

Now the following code is useless, right?

axon/core/run/src/tests.rs

Lines 130 to 147 in f000c0f

for (i, (block_cached, tx)) in genesis
.block
.tx_hashes
.iter()
.zip(genesis.txs.iter())
.enumerate()
{
let tx_cached = tx.transaction.hash;
assert_eq!(
*block_cached, tx_cached,
"check hash of tx[{i}], in-block: {block_cached:#x}, tx-cached: {tx_cached:#x}",
);
let calculated = tx.transaction.clone().calc_hash().hash;
assert_eq!(
tx_cached, calculated,
"check hash of tx[{i}], cached: {tx_cached:#x}, calculated: {calculated:#x}",
);
}

Yes

@KaoImin KaoImin force-pushed the remove-genesis-transaction branch from 94f68f6 to dacb972 Compare October 8, 2023 13:14
@KaoImin

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@KaoImin KaoImin force-pushed the remove-genesis-transaction branch from dacb972 to 7d73ca2 Compare October 9, 2023 04:14
@Flouse
Copy link
Contributor

Flouse commented Oct 9, 2023

/run-ci

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

CI tests run on commit:

CI test list:

  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants