Skip to content
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

Add archive mode support #4571

Merged
merged 1 commit into from
Jun 1, 2022
Merged

Add archive mode support #4571

merged 1 commit into from
Jun 1, 2022

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Mar 16, 2022

Closes #4539

TODO:

  • include runtimes in the archive_api e2e test
  • also test starting a node in archive mode after reaching halt or upgrade epoch
  • deduplicate some of the duplicated code between archive and full node (archive.go and full.go)
  • update instructions to enable archive mode to the changelog fragment
  • wait for Bump Tendermint #4427 to be merged and rebase

@ptrus ptrus force-pushed the ptrus/feature/archive-node branch 13 times, most recently from 2976dcd to 9acded0 Compare March 17, 2022 10:38
@ptrus ptrus added the s:ready-ci Status: ready for CI label Mar 17, 2022
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch 3 times, most recently from dd24376 to 1b0e7c7 Compare March 17, 2022 12:14
@ptrus ptrus marked this pull request as ready for review March 17, 2022 12:15
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

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

There still seems to be quite some duplication in the archive node implementation (e.g., get status, converting heights, getting blocks, results, light blocks, parameters, ...), could those things be extracted as well? You could make a common struct that could be embedded into both archive and full node implementations.

go/oasis-test-runner/oasis/oasis.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #4571 (51e18d5) into master (d34cb93) will increase coverage by 0.40%.
The diff coverage is 71.00%.

@@            Coverage Diff             @@
##           master    #4571      +/-   ##
==========================================
+ Coverage   66.53%   66.94%   +0.40%     
==========================================
  Files         447      448       +1     
  Lines       50065    50246     +181     
==========================================
+ Hits        33313    33639     +326     
+ Misses      12587    12441     -146     
- Partials     4165     4166       +1     
Impacted Files Coverage Δ
go/consensus/api/transaction/transaction.go 44.85% <ø> (ø)
go/consensus/tendermint/api/api.go 83.83% <ø> (ø)
go/consensus/tendermint/full/services.go 74.81% <16.66%> (-6.73%) ⬇️
go/consensus/api/submission.go 60.86% <25.00%> (-3.42%) ⬇️
go/oasis-node/cmd/node/node.go 53.97% <33.33%> (-0.33%) ⬇️
go/upgrade/upgrade.go 63.84% <50.00%> (+0.20%) ⬆️
go/consensus/tendermint/full/common.go 68.09% <68.09%> (ø)
go/consensus/tendermint/full/full.go 65.09% <70.27%> (+1.89%) ⬆️
go/consensus/tendermint/full/archive.go 78.51% <78.51%> (ø)
go/consensus/tendermint/tendermint.go 80.95% <83.33%> (-3.67%) ⬇️
... and 51 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8862481...51e18d5. Read the comment docs.

@ptrus ptrus marked this pull request as draft March 21, 2022 08:16
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch 3 times, most recently from 1ddb7e1 to c7f61d2 Compare March 21, 2022 08:48
@ptrus
Copy link
Member Author

ptrus commented Mar 21, 2022

There still seems to be quite some duplication in the archive node implementation (e.g., get status, converting heights, getting blocks, results, light blocks, parameters, ...), could those things be extracted as well? You could make a common struct that could be embedded into both archive and full node implementations.

I tried out how this would look (see latest commit), it's still a bit messy, but I think most of the code can be dedpulicated. Will clean it up a bit more.

@ptrus ptrus force-pushed the ptrus/feature/archive-node branch from c7f61d2 to a1daea8 Compare March 21, 2022 09:05
go/consensus/tendermint/common/common.go Outdated Show resolved Hide resolved
go/consensus/tendermint/full/light.go Outdated Show resolved Hide resolved
go/consensus/tendermint/full/full.go Outdated Show resolved Hide resolved
go/consensus/tendermint/full/full.go Show resolved Hide resolved
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch 2 times, most recently from 5305d0c to 5976af7 Compare March 22, 2022 13:54
Copy link
Contributor

@Yawning Yawning left a comment

Choose a reason for hiding this comment

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

The screaming you hear is, andrej when his branch has all the conflicts.

OwnTxSigner: srv.identity.NodeSigner.Public(),
DisableCheckpointer: true,
InitialHeight: uint64(srv.genesis.Height),
// ReadOnly should actually be preferable for archive node but this fails with:
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -0,0 +1,4 @@
RequestShutdown: fix shutdown if registration never succeeded
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this get a backport to 22.x?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah makes sense, I'll also extract this into a separate PR, as this PR will wait for andrej's PR to be merged first, so it might take some more time.

@ptrus
Copy link
Member Author

ptrus commented Mar 23, 2022

The screaming you hear is, andrej when his branch has all the conflicts.

Actually thats me 😬 as i'll wait for his PR to get merged first.

@ptrus ptrus force-pushed the ptrus/feature/archive-node branch 2 times, most recently from 69b5b45 to 5ca789a Compare March 24, 2022 12:08
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch from 5ca789a to f4b6f3f Compare March 28, 2022 07:35
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch from f4b6f3f to 7e88bc7 Compare April 8, 2022 14:24
@ptrus ptrus marked this pull request as draft April 12, 2022 19:13
@nftgeek
Copy link

nftgeek commented Apr 15, 2022

Hi When will this feature get ready? @ptrus

@Yawning
Copy link
Contributor

Yawning commented Apr 16, 2022

Hi When will this feature get ready? @ptrus

3 days ago (#4608), assuming you are interested in being able to query state from Cobalt.

@nftgeek
Copy link

nftgeek commented Apr 16, 2022

We are interested in running archive oasis nodes with full blockchain history. we can now, correct?
Any detailed documentation on this topic?

@ptrus ptrus force-pushed the ptrus/feature/archive-node branch 3 times, most recently from ccf1495 to 5947500 Compare May 27, 2022 09:21
@ptrus ptrus marked this pull request as ready for review May 27, 2022 10:19
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch from 5947500 to 056aa80 Compare May 31, 2022 07:30
go/consensus/api/api.go Outdated Show resolved Hide resolved
go/oasis-node/cmd/node/node.go Outdated Show resolved Hide resolved
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch from 056aa80 to 6292854 Compare June 1, 2022 09:22
go/consensus/api/api_test.go Outdated Show resolved Hide resolved
@ptrus ptrus force-pushed the ptrus/feature/archive-node branch from 6292854 to 51e18d5 Compare June 1, 2022 10:12
@ptrus ptrus merged commit 29a9709 into master Jun 1, 2022
@ptrus ptrus deleted the ptrus/feature/archive-node branch June 1, 2022 10:48
@ptrus ptrus mentioned this pull request Jan 26, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:ready-ci Status: ready for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support running oasis-node in "archive" mode
4 participants