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(test): bump lotus version in CI tests #4286

Merged
merged 10 commits into from
May 10, 2024
Merged

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented May 6, 2024

Summary of changes

Changes introduced in this pull request:

  • Bump lotus version to 1.27
  • Fix SectorOnChainInfo struct
  • Blacklist EthGetBlockByNumber
  • Fix gasLimit in EthGetBlockByNumber

Failures(gasLimit not match in EthGetBlockByNumber):

-  "gasLimit": "0x2540be400",

+  "gasLimit": "0x6fc23ac00",
func NewEthBlock(hasTransactions bool, tipsetLen int) EthBlock {
	b := EthBlock{
		Sha3Uncles:       EmptyUncleHash, // Sha3Uncles set to a hardcoded value which is used by some clients to determine if has no uncles.
		StateRoot:        EmptyEthHash,
		TransactionsRoot: EmptyRootHash, // TransactionsRoot set to a hardcoded value which is used by some clients to determine if has no transactions.
		ReceiptsRoot:     EmptyEthHash,
		Difficulty:       EmptyEthInt,
		LogsBloom:        FullEthBloom[:],
		Extradata:        []byte{},
		MixHash:          EmptyEthHash,
		Nonce:            EmptyEthNonce,
		GasLimit:         EthUint64(build.BlockGasLimit * int64(tipsetLen)),
		Uncles:           []EthHash{},
		Transactions:     []interface{}{},
	}
	if hasTransactions {
		b.TransactionsRoot = EmptyEthHash
	}

	return b
}

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@hanabi1224 hanabi1224 marked this pull request as ready for review May 6, 2024 03:40
@hanabi1224 hanabi1224 requested a review from a team as a code owner May 6, 2024 03:40
@hanabi1224 hanabi1224 requested review from elmattic and sudo-shashank and removed request for a team May 6, 2024 03:40

use crate::rpc::types::SectorOnChainInfo;

pub trait MinerStateExt {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel it makes things much easier to move fil_actors_inteface code into forest

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't it make it inconsistent? I don't have a strong opinion on where this should be, but I'd rather have all this in one place and not scattered randomly.

Copy link
Contributor Author

@hanabi1224 hanabi1224 May 6, 2024

Choose a reason for hiding this comment

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

We could have a vote maybe. I prefer the interface in forest to

  1. avoid publishing fil_actor_* crates on every change.
  2. avoid the shim(e.g. miner::SectorOnChainInfo) in the current fil_actors_interface which does not implement LotusJson or JsonSchema and we have to re-define a same one in forest

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to propose an initiative to change this. I only would like this to be in the same place to avoid wildly jumping between repos.

Copy link
Contributor

Choose a reason for hiding this comment

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

@hanabi1224 I prefer the actor interface to be in forest as well.

Comment on lines +263 to 265
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "PascalCase")]
pub struct SectorOnChainInfo {
Copy link
Member

Choose a reason for hiding this comment

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

I assume there's no way of not re-defining this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, this is the struct for LotusJson serde.


use crate::rpc::types::SectorOnChainInfo;

pub trait MinerStateExt {
Copy link
Contributor

Choose a reason for hiding this comment

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

@hanabi1224 I prefer the actor interface to be in forest as well.

@@ -407,9 +407,9 @@ pub struct Block {
}

impl Block {
pub fn new(has_transactions: bool) -> Self {
pub fn new(has_transactions: bool, tipset_len: usize) -> Self {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hanabi1224 hanabi1224 added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit 74e23e6 May 10, 2024
28 checks passed
@hanabi1224 hanabi1224 deleted the hm/ci-test-lotus-1.27 branch May 10, 2024 08:49
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.

4 participants