Skip to content

Commit

Permalink
Use contract id in slot key (#321)
Browse files Browse the repository at this point in the history
* Add BlockInfo#first_cons_time_of_current_block

Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>

* Update SlotKey message to use ContractID instead of an int64, in order to be future-proof for sharding

Signed-off-by: Kim Rader <kim.rader@swirldslabs.com>

* Rename contract_number -> contractID

Signed-off-by: Kim Rader <kim.rader@swirldslabs.com>

---------

Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Kim Rader <kim.rader@swirldslabs.com>
Co-authored-by: Michael Tinker <michael.tinker@swirldslabs.com>
Co-authored-by: Lev Povolotsky <lev@swirldslabs.com>
  • Loading branch information
3 people authored Jan 24, 2024
1 parent 6550604 commit ffe7d9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/state/contract/storage_slot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ option java_package = "com.hederahashgraph.api.proto.java";
// <<<pbj.java_package = "com.hedera.hapi.node.state.contract">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "basic_types.proto";

/**
* The key of a storage slot. A slot is scoped to a specific contract number.
*
Expand All @@ -35,7 +37,7 @@ message SlotKey {
/**
* The number of the contract whose storage this slot belongs to.
*/
int64 contract_number = 1;
ContractID contractID = 1;

/**
* The EVM key of this slot, when left-padded with zeros to form a 256-bit word.
Expand Down

0 comments on commit ffe7d9e

Please sign in to comment.