Skip to content

Conversation

joshuacolvin0
Copy link
Member

No description provided.

* that of the EVM. This means that, under the hood, this hostio is accessing the 32-byte
* value stored in the EVM state trie at offset `key`, which will be `0` when not previously
* set. The semantics, then, are equivalent to that of the EVM's [`SLOAD`] opcode.
*
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's re-add these, since they're the way the blocks are currently formatted

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

*
* [`TLOAD`]: https://www.evm.codes/#5c
*/
VM_HOOK(transient_load_bytes32) void transient_load_bytes32(const uint8_t * key, uint8_t * dest);
Copy link
Contributor

Choose a reason for hiding this comment

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

As we discussed on slack, let's rename these.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

include/hostio.h Outdated
* the EVM transient storage at offset `key`. Furthermore, refunds are tabulated exactly as in the
* EVM. The semantics, then, are equivalent to that of the EVM's [`TSTORE`] opcode.
*
* [`TSTORE`]: https://www.evm.codes/#5d
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's link the following for now since these opcodes don't yet exist
https://eips.ethereum.org/EIPS/eip-1153

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

Comment on lines 45 to 65
/**
* transient_load / store load or store a value from transient storage accordingly.
*
* The value of the first "storage" pointer is not used.
* generated headers provide:
* a const storage pointer when working for a view-only function
* a non const pointer for a mutating function
* no pointer (so don't call transient_load) for a pure function
*
*/
inline void transient_load(const void* storage, const uint8_t *key, uint8_t *dest) {
transient_load_bytes32(key, dest);
}

/**
* see documentation for transient_load
*/
inline void transient_store(void *storage, const uint8_t *key, const uint8_t *value) {
transient_store_bytes32(key, value);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's drop these for now, since we're not yet supporting higher-order affordances

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

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.

2 participants