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

docs: code style updates #2797

Merged
merged 1 commit into from
Mar 19, 2025
Merged

docs: code style updates #2797

merged 1 commit into from
Mar 19, 2025

Conversation

battlmonstr
Copy link
Contributor

Updates with decisions discussed and voted at the workshop meeting.

Andrew confirmed P25 changing to the SPDX short form Apache boilerplate (as in Linux kernel and evmone).

Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

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

Very good, thanks for working on this.


### P30 tx vs txn naming

Use "txn", "txns" abbreviations for Ethereum transactions.
Copy link
Member

Choose a reason for hiding this comment

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

Just a comment, not complain: evmone uses tx for Ethereum transactions because it don't have db :). I think tx is uniformly used in all EVM work.


Accepted styles:

ValidationResult execute_block(
Copy link
Member

Choose a reason for hiding this comment

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

Does clang-format is happy with both variants?

I think you can configure clang-format to have desired formatting but this likely requires putting the line length limit.

Copy link
Contributor Author

@battlmonstr battlmonstr Mar 18, 2025

Choose a reason for hiding this comment

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

Yes, this is the status quo.
I wanted to be stricter here, but we ended up fixating the status quo, because nobody was sure how to reconfigure clang-format. And in particular, people wanted to have a clear separation of the function signature from the body. E.g. in Go/Swift/Rust style it is possible to have the closing ) { on a separate line, and even have a comma after the last argument.


### P25 license boilerplate

Use SPDX short form like in evmone:
Copy link
Member

Choose a reason for hiding this comment

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

Did we confirm we are OK to use the short form?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JacekGlen JacekGlen merged commit ca995b4 into master Mar 19, 2025
5 checks passed
@JacekGlen JacekGlen deleted the pr/style2 branch March 19, 2025 08:19
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