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

Added GnosisSpecProvider and gnosis_loads_properly test #5775

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

MarekM25
Copy link
Contributor

@MarekM25 MarekM25 commented Jun 5, 2023

Changes

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: tests

Testing

Requires testing

  • Yes
  • No

Comment on lines +238 to +240
ChainSpecLoader loader = new(new EthereumJsonSerializer());
string path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "../../../../Chains/gnosis.json");
ChainSpec chainSpec = loader.Load(File.ReadAllText(path));
Copy link
Member

Choose a reason for hiding this comment

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

This is used all over those test would be good to make it a method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, will do in next PR

Comment on lines +245 to +262
List<ForkActivation> forkActivationsToTest = new()
{
(ForkActivation)0,
(ForkActivation)1,
(ForkActivation)(GnosisSpecProvider.ConstantinopoleBlockNumber -1),
(ForkActivation)(GnosisSpecProvider.ConstantinopoleBlockNumber),
(ForkActivation)(GnosisSpecProvider.ConstantinopoleFixBlockNumber -1),
(ForkActivation)(GnosisSpecProvider.ConstantinopoleFixBlockNumber),
(ForkActivation)(GnosisSpecProvider.IstanbulBlockNumber -1),
(ForkActivation)(GnosisSpecProvider.IstanbulBlockNumber),
(ForkActivation)(GnosisSpecProvider.BerlinBlockNumber -1),
(ForkActivation)(GnosisSpecProvider.BerlinBlockNumber),
(ForkActivation)(GnosisSpecProvider.LondonBlockNumber -1),
(ForkActivation)(GnosisSpecProvider.LondonBlockNumber),
(1, GnosisSpecProvider.ShanghaiTimestamp - 1),
(1, GnosisSpecProvider.ShanghaiTimestamp),
(999_999_999, 999_999_999) // far in the future
};
Copy link
Member

Choose a reason for hiding this comment

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

similarly to some extent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it might be a bit harder though. Of course, doable ;)

@MarekM25 MarekM25 merged commit f71e2a6 into master Jun 5, 2023
@MarekM25 MarekM25 deleted the gnosis_spec_provider branch June 5, 2023 19:44
kamilchodola pushed a commit that referenced this pull request Jun 26, 2023
* Working on GnosisSpecProvider

* Passed test

* More GetSpec checks
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.

3 participants