Millisecond-Resolution Close Times #1998
Replies: 3 comments 3 replies
|
Is the intent to change the unit of And there's also a historical boundary problem to solve since ledger N I don't think we'll ever be able to push it below 3.2 (spitballing) because it's disingenuous to give less than 2.5 seconds for network propagation. |
|
stellar-protocol/core/cap-0088.md Lines 231 to 233 in 1ed51db It's possible that a contract may call What assessment has been done of existing contract code entries to determine if "Consecutive ledgers may now observe the same timestamp" will have an impact on any contract? According to stellar-experimental/contract-wasms the
Ref: analysis/host-functions-imported.csv I've added a script in stellar-experimental/contract-wasms#29 that generates a CSV providing some insight into what contracts those are here: This is the host function as defined today: {
"export": "4",
"name": "get_ledger_timestamp",
"args": [],
"return": "U64Val",
"docs": "Return the timestamp number of the current ledger as a u64."
}Ref: soroban-env-common/env.json This is how the host function appears to contract developers today: /// Returns a unix timestamp for when the ledger was closed.
///
/// The timestamp is the number of seconds, excluding leap seconds, that
/// have elapsed since unix epoch. Unix epoch is January 1st, 1970, at
/// 00:00:00 UTC.
///
/// For more details see:
/// - <https://developers.stellar.org/docs/learn/encyclopedia/network-configuration/ledger-headers#close-time>
pub fn timestamp(&self) -> u64 { |
|
stellar-protocol/core/cap-0088.md Lines 133 to 136 in 1ed51db Can the type be named "Milliseconds" is verbose and will show up in client sdk types and other generated code, and we already use "Ms" suffixes in the xdr to refer to milliseconds. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We would like to increase the resolution of closeTime to MS resolution. Currently, closeTime is in whole seconds, making sub-second ledgers and intra-second block times (i.e. 2.5 seconds) impossible at the protocol level. This change will allow the protocol to support lower block times. This change does not inherently lower block times, but opens the door for future upgrade via network config settings.
CAP-88: https://github.com/stellar/stellar-protocol/blob/master/core/cap-0088.md
All reactions