Accessing blockchain data from state machine #8272
Replies: 5 comments 15 replies
-
@ValarDragon . @sunnya97 - is this something you are also looking at? |
Beta Was this translation helpful? Give feedback.
-
The notion of smart contract is confusing here. You mean modules not a vm on top of the SDK right? If so, it may be good to reword the initial comment to use modules nomenclature. I believe this is https://github.com/tendermint/spec/issues/203 similar to what you are looking for. Not sure this is a discussion for here but instead for Tendermint Core. |
Beta Was this translation helpful? Give feedback.
-
I'm confused, these are all about APIs for smart contracts, not about state machine abstractions? Timestamp data seems like it should be in read-only state that a contract can read from, its common to all contracts in a given block. For not copying the rest, doesn't that depend on making the memory model for cosm wasm and golang/rust slices match up? (And having converters between the golang and rust slices?) Seems pretty complex, but this is not something I know much about |
Beta Was this translation helpful? Give feedback.
-
cosmwasm imports the staking module in order to allow for staking derivatives afaik. doesn't this address your concern? |
Beta Was this translation helpful? Give feedback.
-
@robert-zaremba would you like to open a discussion board in the Tendermint repo? There isn't much to discuss sdk side for these changes. |
Beta Was this translation helpful? Give feedback.
-
MOVED
Moved to tendermint/tendermint#5977
Rationale
Currently, State Machine Programs (SMPs) [*] can't query blockchain data (transactions, block headers) from past blocks.
There are several use-cases for that:
The workaround is to copy transaction data into smart-contract state... which is not ideal, because we essentially duplicate a data.
State Machine Program (SMP)
To avoid any confusion, State Machine Program is an on chain app which encapsulates on-chain state logic. This could be: SDK module, comswasm smart contract, agoric smart contract, state-machine module....
Goals
Beta Was this translation helpful? Give feedback.
All reactions