-
Notifications
You must be signed in to change notification settings - Fork 86
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
Upgrade script to use usecs after timestamp upgrading timestamp logic #1075
Conversation
Provide From conversion impls to construct PrivateKey and Signature from byte arrays. The conversions into PrivateKey are fallible, while a Signature is allowed to be constructed from any 64 bytes.
Add TestSigner providing an in-process Signing implementation for tests.
TryFromBytes is not needed, neither is the public key as a member of HashiCorpVault state.
…yz/movement into musitdev/alloy-integration
…to l-monninger/gas-upgrades-beta-fixes
…com/movementlabsxyz/movement into l-monninger/gas-upgrades-beta-fixes
|
||
impl<C> TryFrom<block::Id> for InnerSignedBlobV1Data<C> | ||
where | ||
C: Curve + Verify<C> + Digester<C>, | ||
{ | ||
type Error = anyhow::Error; | ||
|
||
fn try_from(id: block::Id) -> Result<Self, Self::Error> { | ||
let blob = id.as_bytes().to_vec(); | ||
Ok(Self::now(blob)) | ||
} | ||
} | ||
|
||
impl<C> TryFrom<Vec<block::Id>> for InnerSignedBlobV1Data<C> | ||
where | ||
C: Curve + Verify<C> + Digester<C>, | ||
{ | ||
type Error = anyhow::Error; | ||
|
||
fn try_from(ids: Vec<block::Id>) -> Result<Self, Self::Error> { | ||
let blob = bcs::to_bytes(&ids)?; | ||
Ok(Self::now(blob)) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These conversions look suspicious next to TryFrom<Block>
, and they were previously removed. Is it really so that a blob can encode a block, a single ID, or an array of IDs, with nothing to discriminate?
The change also does not seem to belong with the rest of the PR. A stray checkout, perhaps?
@@ -162,7 +162,7 @@ where | |||
let now_u64 = std::time::SystemTime::now() | |||
.duration_since(std::time::UNIX_EPOCH) | |||
.map_err(|e| ReleaseBundleError::Build(e.into()))? | |||
.as_secs(); | |||
.as_micros() as u64; | |||
let expiration_timestamp_secs = now_u64 + expiration_timestamp_sec_offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value seems wrongly computed now, if expiration_timestamp_sec_offset
is still in seconds.
We could benefit from a Timestamp
domain type with controlled conversions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mzabaluev @l-monninger is the test command correct? When I run
nix develop --extra-experimental-features nix-command --extra-experimental-features flakes --command bash -c "just movement-full-node native build.setup.eth-local.celestia-local.test-bring-up-elsa-to-biarritz-rc1"
I get error: Recipe
movement-full-node failed on line 6 with exit code 101
@l-monninger @mzabaluev @0xmovses as far as I can tell, this is incorrect, because: In
Same with in this function:
60,000 seconds is 16.7 hours, whihc makes sense for allowing votes on the migration, if I understand it correctly.
I might be misunderstanding it, but yeah I seem to be resonating with Mikhail's comment: #1075 (comment) Still looking into the details for greater certainty and best solutions. I'm not sure how easy it would be to implement the |
…logic (#1075) Co-authored-by: Andy Golay <andygolay@gmail.com> Co-authored-by: musitdev <philippe.delrieu@free.fr> Co-authored-by: Mikhail Zabaluev <mikhail.zabaluev@movementlabs.xyz> Co-authored-by: Richard Melkonian <35300528+0xmovses@users.noreply.github.com> Co-authored-by: Icarus131 <anirudhprasad131@protonmail.com> Co-authored-by: primata <primata@movementlabs.xyz> Co-authored-by: Icarus131 <anirudhprasad131@gmail.com> Co-authored-by: Richard Melkonian <r.v.melkonian@gmail.com> Co-authored-by: Radu Popa <radupopa21be@gmail.com>
Summary
protocol-units
,networks
,scripts
,util
,cicd
, ormisc
.#1067 changes fixes a bug that emerged from the unsuccessful marshaling of secs and usecs across upgrades. This is a downstream response to that change.
Changelog
Testing
Outstanding issues