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

Update solidity-support: block.coinbase and block.difficulty #351

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

DZGoldman
Copy link
Contributor

No description provided.

@cla-bot cla-bot bot added the s label Jun 15, 2023
@vercel
Copy link

vercel bot commented Jun 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nitro-docs ✅ Ready (Inspect) Visit Preview Jul 18, 2023 8:55pm

Copy link

@X-oss-byte X-oss-byte left a comment

Choose a reason for hiding this comment

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

allow changes

@@ -7,7 +7,7 @@ Arbitrum Nitro chains are Ethereum compatible, and therefore allow you to trustl
Although Arbitrum supports Solidity code, there are differences in the effects of a few operations, including language features that don't make much sense in the Layer 2 context:

- `blockhash(x)` returns a cryptographically insecure, pseudo-random hash for `x` within the range `block.number - 256 <= x < block.number`. If `x` is outside of this range, `blockhash(x)` will return `0`. This includes `blockhash(block.number)`, which always returns `0` just like on Ethereum. The hashes returned do not come from L1.
- `block.coinbase` returns zero
- `block.coinbase` returns the address of the L2 transaction's L1 batch poster
Copy link

Choose a reason for hiding this comment

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

Will the batch poster always be 0xA4b000000000000000000073657175656e636572? I noticed this error in the docs while working on evm-diff and documented this as a question here. I came here to open an issue about it, but than found this PR.

There's a few other questions in there of things I couldn't find in the docs, or places where the docs seem inaccurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @mds1 - you're correct, these docs were out of date; I've pushed an update, ty!

Copy link

Choose a reason for hiding this comment

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

Thanks!

Does tx.origin also need to be added? I'm not sure if tx.origin address is also aliased for L1-to-L2 "retryable ticket" transactions, or if only msg.sender is aliased

@DZGoldman DZGoldman changed the title Update solidity-support: block.coinbase Update solidity-support: block.coinbase and block.difficulty Jul 18, 2023
@DZGoldman DZGoldman requested review from tsahee and TucksonDev July 18, 2023 20:00
Copy link

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

LGTM

@TucksonDev TucksonDev merged commit 07570fa into master Jul 20, 2023
@TucksonDev TucksonDev deleted the DZGoldman-patch-2 branch July 20, 2023 11:01
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.

6 participants