From 5a062e7a57989618a56f9ab0c91b8b24793c9880 Mon Sep 17 00:00:00 2001 From: ptrus Date: Wed, 10 Jul 2024 18:47:59 +0200 Subject: [PATCH 1/2] nodeapi: introduce genesis document struct and include proposal metadata --- analyzer/consensus/consensus.go | 20 +++- analyzer/consensus/genesis.go | 24 +++-- analyzer/queries/queries.go | 12 +-- api/spec/v1.yaml | 6 ++ storage/client/client.go | 4 + storage/client/queries/queries.go | 4 +- storage/migrations/00_consensus.up.sql | 4 + .../migrations/27_proposals_metadata.up.sql | 9 ++ storage/oasis/nodeapi/api.go | 38 +++++++- storage/oasis/nodeapi/cobalt/convert.go | 26 ++++-- storage/oasis/nodeapi/cobalt/node.go | 5 +- storage/oasis/nodeapi/damask/convert.go | 91 ++++++++++++++++++- storage/oasis/nodeapi/damask/node.go | 10 +- storage/oasis/nodeapi/eden/convert.go | 69 ++------------ storage/oasis/nodeapi/eden/node.go | 7 +- storage/oasis/nodeapi/file/consensus.go | 17 ++-- storage/oasis/nodeapi/history/history.go | 5 +- 17 files changed, 231 insertions(+), 120 deletions(-) create mode 100644 storage/migrations/27_proposals_metadata.up.sql diff --git a/analyzer/consensus/consensus.go b/analyzer/consensus/consensus.go index bffd778cf..27655f551 100644 --- a/analyzer/consensus/consensus.go +++ b/analyzer/consensus/consensus.go @@ -19,7 +19,6 @@ import ( "github.com/oasisprotocol/nexus/analyzer/consensus/static" "github.com/oasisprotocol/nexus/analyzer/util/addresses" "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api/transaction" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" staking "github.com/oasisprotocol/nexus/coreapi/v22.2.11/staking/api" "github.com/oasisprotocol/nexus/analyzer" @@ -154,7 +153,7 @@ func (m *processor) FinalizeFastSync(ctx context.Context, lastFastSyncHeight int if err != nil { return fmt.Errorf("no history record for first slow-sync height %d: %w", firstSlowSyncHeight, err) } - var genesisDoc *genesis.Document + var genesisDoc *nodeapi.GenesisDocument var nodes []nodeapi.Node if r.GenesisHeight == firstSlowSyncHeight { m.logger.Info("fetching genesis document before starting with the first block of a chain", "chain_context", r.ChainContext, "genesis_height", r.GenesisHeight) @@ -196,7 +195,7 @@ func (m *processor) aggregateFastSyncTables(ctx context.Context) error { } // Dumps the genesis document to a JSON file if instructed via env variables. For debug only. -func (m *processor) debugDumpGenesisJSON(genesisDoc *genesis.Document, heightOrName string) { +func (m *processor) debugDumpGenesisJSON(genesisDoc *nodeapi.GenesisDocument, heightOrName string) { debugPath := os.Getenv("NEXUS_DUMP_GENESIS") // can be templatized with "{{height}}" if debugPath == "" { return @@ -216,7 +215,7 @@ func (m *processor) debugDumpGenesisJSON(genesisDoc *genesis.Document, heightOrN // Executes SQL queries to index the contents of the genesis document. // If nodesOverride is non-nil, it is used instead of the nodes from the genesis document. -func (m *processor) processGenesis(ctx context.Context, genesisDoc *genesis.Document, nodesOverride []nodeapi.Node) error { +func (m *processor) processGenesis(ctx context.Context, genesisDoc *nodeapi.GenesisDocument, nodesOverride []nodeapi.Node) error { m.logger.Info("processing genesis document") gen := NewGenesisProcessor(m.logger.With("height", "genesis")) batch, err := gen.Process(genesisDoc, nodesOverride) @@ -1127,6 +1126,13 @@ func (m *processor) queueSubmissions(batch *storage.QueryBatch, data *governance } for _, submission := range data.ProposalSubmissions { + var title, description *string + if submission.Content.Metadata != nil { + metadata := submission.Content.Metadata + title = &metadata.Title + description = &metadata.Description + } + switch { case submission.Content.Upgrade != nil: batch.Queue(queries.ConsensusProposalSubmissionInsert, @@ -1134,6 +1140,8 @@ func (m *processor) queueSubmissions(batch *storage.QueryBatch, data *governance submission.Submitter.String(), submission.State.String(), submission.Deposit.String(), + title, + description, submission.Content.Upgrade.Handler, submission.Content.Upgrade.Target.ConsensusProtocol.String(), submission.Content.Upgrade.Target.RuntimeHostProtocol.String(), @@ -1149,6 +1157,8 @@ func (m *processor) queueSubmissions(batch *storage.QueryBatch, data *governance submission.Submitter.String(), submission.State.String(), submission.Deposit.String(), + title, + description, submission.Content.CancelUpgrade.ProposalID, submission.CreatedAt, submission.ClosesAt, @@ -1160,6 +1170,8 @@ func (m *processor) queueSubmissions(batch *storage.QueryBatch, data *governance submission.Submitter.String(), submission.State.String(), submission.Deposit.String(), + title, + description, submission.Content.ChangeParameters.Module, []byte(submission.Content.ChangeParameters.Changes), submission.CreatedAt, diff --git a/analyzer/consensus/genesis.go b/analyzer/consensus/genesis.go index 1aae2c4bd..13179e77a 100644 --- a/analyzer/consensus/genesis.go +++ b/analyzer/consensus/genesis.go @@ -11,8 +11,6 @@ import ( "github.com/oasisprotocol/nexus/analyzer/queries" "github.com/oasisprotocol/nexus/common" - beacon "github.com/oasisprotocol/nexus/coreapi/v22.2.11/beacon/api" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" registry "github.com/oasisprotocol/nexus/coreapi/v22.2.11/registry/api" staking "github.com/oasisprotocol/nexus/coreapi/v22.2.11/staking/api" "github.com/oasisprotocol/nexus/storage" @@ -33,7 +31,7 @@ func NewGenesisProcessor(logger *log.Logger) *GenesisProcessor { // Process generates SQL statements for indexing the genesis state. // `nodesOverride` can be nil; if non-nil, the behavior is as if the genesis document contained that set of nodes instead of whatever it contains. -func (mg *GenesisProcessor) Process(document *genesis.Document, nodesOverride []nodeapi.Node) (*storage.QueryBatch, error) { +func (mg *GenesisProcessor) Process(document *nodeapi.GenesisDocument, nodesOverride []nodeapi.Node) (*storage.QueryBatch, error) { batch := &storage.QueryBatch{} if err := mg.addRegistryBackendMigrations(batch, document, nodesOverride); err != nil { @@ -51,7 +49,7 @@ func (mg *GenesisProcessor) Process(document *genesis.Document, nodesOverride [] return batch, nil } -func (mg *GenesisProcessor) addRegistryBackendMigrations(batch *storage.QueryBatch, document *genesis.Document, nodesOverride []nodeapi.Node) error { +func (mg *GenesisProcessor) addRegistryBackendMigrations(batch *storage.QueryBatch, document *nodeapi.GenesisDocument, nodesOverride []nodeapi.Node) error { // Populate entities. for _, signedEntity := range document.Registry.Entities { var entity entity.Entity @@ -102,7 +100,7 @@ func (mg *GenesisProcessor) addRegistryBackendMigrations(batch *storage.QueryBat // Also, nexus performs internal lossy data conversions where signatures are lost. return err } - if beacon.EpochTime(node.Expiration) < document.Beacon.Base { + if node.Expiration < document.BaseEpoch { // Node expired before the genesis epoch, skip. continue } @@ -139,7 +137,7 @@ func (mg *GenesisProcessor) addRegistryBackendMigrations(batch *storage.QueryBat return nil } -func (mg *GenesisProcessor) addStakingBackendMigrations(batch *storage.QueryBatch, document *genesis.Document) error { +func (mg *GenesisProcessor) addStakingBackendMigrations(batch *storage.QueryBatch, document *nodeapi.GenesisDocument) error { // Populate accounts. // Populate special accounts with reserved addresses. @@ -259,11 +257,17 @@ func (mg *GenesisProcessor) addStakingBackendMigrations(batch *storage.QueryBatc return nil } -func (mg *GenesisProcessor) addGovernanceBackendMigrations(batch *storage.QueryBatch, document *genesis.Document) { +func (mg *GenesisProcessor) addGovernanceBackendMigrations(batch *storage.QueryBatch, document *nodeapi.GenesisDocument) { // Populate proposals. // TODO: Extract `executed` for proposal. for _, proposal := range document.Governance.Proposals { + var title, description *string + if proposal.Content.Metadata != nil { + title = &proposal.Content.Metadata.Title + description = &proposal.Content.Metadata.Description + } + switch { case proposal.Content.Upgrade != nil: batch.Queue(queries.ConsensusProposalSubmissionInsert, @@ -271,6 +275,8 @@ func (mg *GenesisProcessor) addGovernanceBackendMigrations(batch *storage.QueryB proposal.Submitter.String(), proposal.State.String(), proposal.Deposit.ToBigInt(), + title, + description, proposal.Content.Upgrade.Handler, proposal.Content.Upgrade.Target.ConsensusProtocol.String(), proposal.Content.Upgrade.Target.RuntimeHostProtocol.String(), @@ -286,6 +292,8 @@ func (mg *GenesisProcessor) addGovernanceBackendMigrations(batch *storage.QueryB proposal.Submitter.String(), proposal.State.String(), proposal.Deposit.ToBigInt(), + title, + description, proposal.Content.CancelUpgrade.ProposalID, proposal.CreatedAt, proposal.ClosesAt, @@ -297,6 +305,8 @@ func (mg *GenesisProcessor) addGovernanceBackendMigrations(batch *storage.QueryB proposal.Submitter.String(), proposal.State.String(), proposal.Deposit.ToBigInt(), + title, + description, proposal.Content.ChangeParameters.Module, proposal.Content.ChangeParameters.Changes, proposal.CreatedAt, diff --git a/analyzer/queries/queries.go b/analyzer/queries/queries.go index 63f3158a4..48b39a0f0 100644 --- a/analyzer/queries/queries.go +++ b/analyzer/queries/queries.go @@ -457,16 +457,16 @@ var ( TRUNCATE chain.committee_members` ConsensusProposalSubmissionInsert = ` - INSERT INTO chain.proposals (id, submitter, state, deposit, handler, cp_target_version, rhp_target_version, rcp_target_version, upgrade_epoch, created_at, closes_at, invalid_votes) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)` + INSERT INTO chain.proposals (id, submitter, state, deposit, title, description, handler, cp_target_version, rhp_target_version, rcp_target_version, upgrade_epoch, created_at, closes_at, invalid_votes) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)` ConsensusProposalSubmissionCancelInsert = ` - INSERT INTO chain.proposals (id, submitter, state, deposit, cancels, created_at, closes_at, invalid_votes) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8)` + INSERT INTO chain.proposals (id, submitter, state, deposit, title, description, cancels, created_at, closes_at, invalid_votes) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)` ConsensusProposalSubmissionChangeParametersInsert = ` - INSERT INTO chain.proposals (id, submitter, state, deposit, parameters_change_module, parameters_change, created_at, closes_at, invalid_votes) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)` + INSERT INTO chain.proposals (id, submitter, state, deposit, title, description, parameters_change_module, parameters_change, created_at, closes_at, invalid_votes) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)` ConsensusProposalExecutionsUpdate = ` UPDATE chain.proposals diff --git a/api/spec/v1.yaml b/api/spec/v1.yaml index 84dfa7da3..273d7e36e 100644 --- a/api/spec/v1.yaml +++ b/api/spec/v1.yaml @@ -2286,6 +2286,12 @@ components: deposit: allOf: [$ref: '#/components/schemas/TextBigInt'] description: The deposit attached to this proposal. + title: + type: string + description: The (optional) title of the proposal. + description: + type: string + description: The (optional) description of the proposal. handler: type: string description: The name of the upgrade handler. diff --git a/storage/client/client.go b/storage/client/client.go index ff7001c28..b05cd022c 100644 --- a/storage/client/client.go +++ b/storage/client/client.go @@ -1118,6 +1118,8 @@ func (c *StorageClient) Proposals(ctx context.Context, p apiTypes.GetConsensusPr &p.Submitter, &p.State, &p.Deposit, + &p.Title, + &p.Description, &p.Handler, &p.Target.ConsensusProtocol, &p.Target.RuntimeHostProtocol, @@ -1159,6 +1161,8 @@ func (c *StorageClient) Proposal(ctx context.Context, proposalID uint64) (*Propo &p.Submitter, &p.State, &p.Deposit, + &p.Title, + &p.Description, &p.Handler, &p.Target.ConsensusProtocol, &p.Target.RuntimeHostProtocol, diff --git a/storage/client/queries/queries.go b/storage/client/queries/queries.go index 8d4d0a4d5..146b8c30a 100644 --- a/storage/client/queries/queries.go +++ b/storage/client/queries/queries.go @@ -254,7 +254,7 @@ const ( OFFSET $3::bigint` Proposals = ` - SELECT id, submitter, state, deposit, handler, cp_target_version, rhp_target_version, rcp_target_version, + SELECT id, submitter, state, deposit, title, description, handler, cp_target_version, rhp_target_version, rcp_target_version, upgrade_epoch, cancels, parameters_change_module, parameters_change, created_at, closes_at, invalid_votes FROM chain.proposals WHERE ($1::text IS NULL OR submitter = $1::text) AND @@ -264,7 +264,7 @@ const ( OFFSET $4::bigint` Proposal = ` - SELECT id, submitter, state, deposit, handler, cp_target_version, rhp_target_version, rcp_target_version, + SELECT id, submitter, state, deposit, title, description, handler, cp_target_version, rhp_target_version, rcp_target_version, upgrade_epoch, cancels, parameters_change_module, parameters_change, created_at, closes_at, invalid_votes FROM chain.proposals WHERE id = $1::bigint` diff --git a/storage/migrations/00_consensus.up.sql b/storage/migrations/00_consensus.up.sql index 0cdc12120..53fcbead1 100644 --- a/storage/migrations/00_consensus.up.sql +++ b/storage/migrations/00_consensus.up.sql @@ -282,6 +282,10 @@ CREATE TABLE chain.proposals executed BOOLEAN NOT NULL DEFAULT false, deposit UINT_NUMERIC NOT NULL, + -- Added in 27_proposals_metadata.up.sql. + -- title TEXT, + -- description TEXT, + -- If this proposal is a new proposal. handler TEXT, cp_target_version TEXT, diff --git a/storage/migrations/27_proposals_metadata.up.sql b/storage/migrations/27_proposals_metadata.up.sql new file mode 100644 index 000000000..164b2b2be --- /dev/null +++ b/storage/migrations/27_proposals_metadata.up.sql @@ -0,0 +1,9 @@ +BEGIN; + +ALTER TABLE chain.proposals + ADD COLUMN title TEXT; + +ALTER TABLE chain.proposals + ADD COLUMN description TEXT; + +COMMIT; diff --git a/storage/oasis/nodeapi/api.go b/storage/oasis/nodeapi/api.go index 0df630635..cd83ea4d6 100644 --- a/storage/oasis/nodeapi/api.go +++ b/storage/oasis/nodeapi/api.go @@ -1,3 +1,15 @@ +// Due to the (sometimes breaking) changes in the types used by different +// evolutions of oasis-core over the Cobalt, Damask, and Eden upgrades, +// Nexus defines its own set of internal types here. +// +// The types that it exposes are mostly simplified versions of the types exposed by +// oasis-core Damask: The top-level type structs are defined in this file, and +// the types of their fields are almost universally directly the types exposed +// by oasis-core Damask. The reason is that as oasis-core evolves, Damask types +// are mostly able to represent all the information from Cobalt, plus some. However, +// there are a few exceptions where we use oasis-core Eden types instead, e.g. in the +// `governance` module. Over time, types should be migrated to newer versions, e.g. Eden +// or later, as needed. package nodeapi import ( @@ -16,13 +28,12 @@ import ( consensus "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api" consensusTransaction "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api/transaction" consensusResults "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api/transaction/results" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" - governance "github.com/oasisprotocol/nexus/coreapi/v22.2.11/governance/api" registry "github.com/oasisprotocol/nexus/coreapi/v22.2.11/registry/api" roothash "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api" "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api/message" scheduler "github.com/oasisprotocol/nexus/coreapi/v22.2.11/scheduler/api" staking "github.com/oasisprotocol/nexus/coreapi/v22.2.11/staking/api" + governance "github.com/oasisprotocol/nexus/coreapi/v24.0/governance/api" "github.com/oasisprotocol/nexus/storage/oasis/connections" sdkClient "github.com/oasisprotocol/oasis-sdk/client-sdk/go/client" @@ -49,9 +60,8 @@ import ( // Since the types are simpler and fewer, their structure is, in // places, flattened compared to their counterparts in oasis-core. type ConsensusApiLite interface { - // TODO: Introduce internal, stripped-down version of `genesis.Document`. - GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error) - StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error) + GetGenesisDocument(ctx context.Context, chainContext string) (*GenesisDocument, error) + StateToGenesis(ctx context.Context, height int64) (*GenesisDocument, error) GetConsensusParameters(ctx context.Context, height int64) (*ConsensusParameters, error) GetBlock(ctx context.Context, height int64) (*consensus.Block, error) GetTransactionsWithResults(ctx context.Context, height int64) ([]TransactionWithResults, error) @@ -293,3 +303,21 @@ type RuntimeBlockHeader struct { //nolint: maligned MessagesHash hash.Hash InMessagesHash hash.Hash // NOTE: Available starting in Damask. } + +// GenesisDocument is a stripped-down version of `genesis.Document`. +type GenesisDocument struct { + // Height is the block height at which the document was generated. + Height int64 `json:"height"` + // Time is the time the genesis block was constructed. + Time time.Time `json:"genesis_time"` + // ChainID is the ID of the chain. + ChainID string `json:"chain_id"` + // BaseEpoch is the base epoch for the chain. + BaseEpoch uint64 `json:"base_epoch"` + // Registry is the registry genesis state. + Registry registry.Genesis `json:"registry"` + // RootHash is the roothash genesis state. + Staking staking.Genesis `json:"staking"` + // Governance is the governance genesis state. + Governance governance.Genesis `json:"governance"` +} diff --git a/storage/oasis/nodeapi/cobalt/convert.go b/storage/oasis/nodeapi/cobalt/convert.go index 88dfeb8f1..a6a12dd10 100644 --- a/storage/oasis/nodeapi/cobalt/convert.go +++ b/storage/oasis/nodeapi/cobalt/convert.go @@ -12,13 +12,12 @@ import ( coreCommon "github.com/oasisprotocol/oasis-core/go/common" consensus "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" - governance "github.com/oasisprotocol/nexus/coreapi/v22.2.11/governance/api" registry "github.com/oasisprotocol/nexus/coreapi/v22.2.11/registry/api" "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api/message" scheduler "github.com/oasisprotocol/nexus/coreapi/v22.2.11/scheduler/api" staking "github.com/oasisprotocol/nexus/coreapi/v22.2.11/staking/api" - upgrade "github.com/oasisprotocol/nexus/coreapi/v22.2.11/upgrade/api" + governance "github.com/oasisprotocol/nexus/coreapi/v24.0/governance/api" + upgrade "github.com/oasisprotocol/nexus/coreapi/v24.0/upgrade/api" apiTypes "github.com/oasisprotocol/nexus/api/v1/types" "github.com/oasisprotocol/nexus/common" @@ -48,6 +47,7 @@ func convertProposal(p *governanceCobalt.Proposal) *governance.Proposal { State: governance.ProposalState(p.State), Deposit: p.Deposit, Content: governance.ProposalContent{ + Metadata: nil, // Not present in Damask. Upgrade: &governance.UpgradeProposal{ Descriptor: upgrade.Descriptor{ Versioned: p.Content.Upgrade.Descriptor.Versioned, @@ -102,7 +102,7 @@ func convertRuntime(r *registryCobalt.Runtime) *registry.Runtime { // nexus-internal (= current oasis-core) format. // WARNING: This is a partial conversion, only the fields that are used by // Nexus are filled in the output document. -func ConvertGenesis(d genesisCobalt.Document) *genesis.Document { +func ConvertGenesis(d genesisCobalt.Document) *nodeapi.GenesisDocument { proposals := make([]*governance.Proposal, len(d.Governance.Proposals)) for i, p := range d.Governance.Proposals { proposals[i] = convertProposal(p) @@ -153,18 +153,24 @@ func ConvertGenesis(d genesisCobalt.Document) *genesis.Document { runtimes[i] = convertRuntime(r) } - return &genesis.Document{ - Height: d.Height, - Time: d.Time, - ChainID: d.ChainID, + suspendedRuntimes := make([]*registry.Runtime, len(d.Registry.SuspendedRuntimes)) + for i, r := range d.Registry.SuspendedRuntimes { + suspendedRuntimes[i] = convertRuntime(r) + } + + return &nodeapi.GenesisDocument{ + Height: d.Height, + Time: d.Time, + ChainID: d.ChainID, + BaseEpoch: uint64(d.Beacon.Base), Governance: governance.Genesis{ Proposals: proposals, VoteEntries: voteEntries, }, Registry: registry.Genesis{ Entities: d.Registry.Entities, - Runtimes: []*registry.Runtime{}, - SuspendedRuntimes: []*registry.Runtime{}, + Runtimes: runtimes, + SuspendedRuntimes: suspendedRuntimes, Nodes: d.Registry.Nodes, }, Staking: staking.Genesis{ diff --git a/storage/oasis/nodeapi/cobalt/node.go b/storage/oasis/nodeapi/cobalt/node.go index 574954f62..789acf0f3 100644 --- a/storage/oasis/nodeapi/cobalt/node.go +++ b/storage/oasis/nodeapi/cobalt/node.go @@ -13,7 +13,6 @@ import ( beacon "github.com/oasisprotocol/nexus/coreapi/v22.2.11/beacon/api" consensus "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api" consensusTx "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api/transaction" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" governance "github.com/oasisprotocol/nexus/coreapi/v22.2.11/governance/api" roothash "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api" scheduler "github.com/oasisprotocol/nexus/coreapi/v22.2.11/scheduler/api" @@ -54,7 +53,7 @@ func (c *ConsensusApiLite) Close() error { return c.grpcConn.Close() } -func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error) { +func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*nodeapi.GenesisDocument, error) { var rsp genesisCobalt.Document if err := c.grpcConn.Invoke(ctx, "/oasis-core.Consensus/GetGenesisDocument", nil, &rsp); err != nil { return nil, fmt.Errorf("GetGenesisDocument(cobalt): %w", err) @@ -62,7 +61,7 @@ func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext return ConvertGenesis(rsp), nil } -func (c *ConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error) { +func (c *ConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*nodeapi.GenesisDocument, error) { var rsp genesisCobalt.Document if err := c.grpcConn.Invoke(ctx, "/oasis-core.Consensus/StateToGenesis", height, &rsp); err != nil { return nil, fmt.Errorf("StateToGenesis(%d): %w", height, err) diff --git a/storage/oasis/nodeapi/damask/convert.go b/storage/oasis/nodeapi/damask/convert.go index 2db34f08f..8424c4c46 100644 --- a/storage/oasis/nodeapi/damask/convert.go +++ b/storage/oasis/nodeapi/damask/convert.go @@ -6,19 +6,55 @@ import ( // nexus-internal data types. coreCommon "github.com/oasisprotocol/oasis-core/go/common" "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" + "github.com/oasisprotocol/oasis-core/go/common/quantity" apiTypes "github.com/oasisprotocol/nexus/api/v1/types" "github.com/oasisprotocol/nexus/common" "github.com/oasisprotocol/nexus/storage/oasis/nodeapi" + governance "github.com/oasisprotocol/nexus/coreapi/v24.0/governance/api" + upgrade "github.com/oasisprotocol/nexus/coreapi/v24.0/upgrade/api" + // data types for Damask gRPC APIs. txResultsDamask "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api/transaction/results" + genesisDamask "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" governanceDamask "github.com/oasisprotocol/nexus/coreapi/v22.2.11/governance/api" registryDamask "github.com/oasisprotocol/nexus/coreapi/v22.2.11/registry/api" roothashDamask "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api" stakingDamask "github.com/oasisprotocol/nexus/coreapi/v22.2.11/staking/api" ) +func convertProposal(p *governanceDamask.Proposal) *governance.Proposal { + results := make(map[governance.Vote]quantity.Quantity) + for k, v := range p.Results { + results[governance.Vote(k)] = v + } + + return &governance.Proposal{ + ID: p.ID, + Submitter: p.Submitter, + State: governance.ProposalState(p.State), + Deposit: p.Deposit, + Content: governance.ProposalContent{ + Metadata: nil, // Not present in Damask. + Upgrade: &governance.UpgradeProposal{ + Descriptor: upgrade.Descriptor{ + Versioned: p.Content.Upgrade.Descriptor.Versioned, + Handler: upgrade.HandlerName(p.Content.Upgrade.Descriptor.Handler), + Target: p.Content.Upgrade.Descriptor.Target, + Epoch: p.Content.Upgrade.Descriptor.Epoch, + }, + }, + CancelUpgrade: (*governance.CancelUpgradeProposal)(p.Content.CancelUpgrade), + ChangeParameters: (*governance.ChangeParametersProposal)(p.Content.ChangeParameters), + }, + CreatedAt: p.CreatedAt, + ClosesAt: p.ClosesAt, + Results: results, + InvalidVotes: p.InvalidVotes, + } +} + func convertStakingEvent(e stakingDamask.Event) nodeapi.Event { ret := nodeapi.Event{} switch { @@ -215,9 +251,13 @@ func convertGovernanceEvent(e governanceDamask.Event) nodeapi.Event { } case e.ProposalFinalized != nil: ret = nodeapi.Event{ - GovernanceProposalFinalized: (*nodeapi.ProposalFinalizedEvent)(e.ProposalFinalized), - RawBody: common.TryAsJSON(e.ProposalFinalized), - Type: apiTypes.ConsensusEventTypeGovernanceProposalFinalized, + GovernanceProposalFinalized: &nodeapi.ProposalFinalizedEvent{ + ID: e.ProposalFinalized.ID, + // This assumes that the ProposalState enum is backwards-compatible + State: governance.ProposalState(e.ProposalFinalized.State), + }, + RawBody: common.TryAsJSON(e.ProposalFinalized), + Type: apiTypes.ConsensusEventTypeGovernanceProposalFinalized, } case e.Vote != nil: ret = nodeapi.Event{ @@ -261,3 +301,48 @@ func convertTxResult(r txResultsDamask.Result) nodeapi.TxResult { Events: events, } } + +// ConvertGenesis converts a genesis document from the Damask format to the +// nexus-internal (= current oasis-core) format. +func ConvertGenesis(d genesisDamask.Document) *nodeapi.GenesisDocument { + proposals := make([]*governance.Proposal, len(d.Governance.Proposals)) + for i, p := range d.Governance.Proposals { + proposals[i] = convertProposal(p) + } + + voteEntries := make(map[uint64][]*governance.VoteEntry, len(d.Governance.VoteEntries)) + for k, v := range d.Governance.VoteEntries { + voteEntries[k] = make([]*governance.VoteEntry, len(v)) + for i, ve := range v { + voteEntries[k][i] = &governance.VoteEntry{ + Voter: ve.Voter, + Vote: governance.Vote(ve.Vote), + } + } + } + + return &nodeapi.GenesisDocument{ + Height: d.Height, + Time: d.Time, + ChainID: d.ChainID, + BaseEpoch: uint64(d.Beacon.Base), + Governance: governance.Genesis{ + Proposals: proposals, + VoteEntries: voteEntries, + }, + Registry: registryDamask.Genesis{ + Entities: d.Registry.Entities, + Runtimes: d.Registry.Runtimes, + SuspendedRuntimes: d.Registry.SuspendedRuntimes, + Nodes: d.Registry.Nodes, + }, + Staking: stakingDamask.Genesis{ + CommonPool: d.Staking.CommonPool, + LastBlockFees: d.Staking.LastBlockFees, + GovernanceDeposits: d.Staking.GovernanceDeposits, + Ledger: d.Staking.Ledger, + Delegations: d.Staking.Delegations, + DebondingDelegations: d.Staking.DebondingDelegations, + }, + } +} diff --git a/storage/oasis/nodeapi/damask/node.go b/storage/oasis/nodeapi/damask/node.go index a62a4fb16..a024474bc 100644 --- a/storage/oasis/nodeapi/damask/node.go +++ b/storage/oasis/nodeapi/damask/node.go @@ -47,20 +47,20 @@ func (c *ConsensusApiLite) Close() error { return c.grpcConn.Close() } -func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error) { +func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*nodeapi.GenesisDocument, error) { var rsp genesis.Document if err := c.grpcConn.Invoke(ctx, "/oasis-core.Consensus/GetGenesisDocument", nil, &rsp); err != nil { return nil, fmt.Errorf("GetGenesisDocument(damask): %w", err) } - return &rsp, nil + return ConvertGenesis(rsp), nil } -func (c *ConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error) { +func (c *ConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*nodeapi.GenesisDocument, error) { var rsp genesis.Document if err := c.grpcConn.Invoke(ctx, "/oasis-core.Consensus/StateToGenesis", height, &rsp); err != nil { return nil, fmt.Errorf("StateToGenesis(%d): %w", height, err) } - return &rsp, nil + return ConvertGenesis(rsp), nil } func (c *ConsensusApiLite) GetConsensusParameters(ctx context.Context, height int64) (*nodeapi.ConsensusParameters, error) { @@ -230,7 +230,7 @@ func (c *ConsensusApiLite) GetProposal(ctx context.Context, height int64, propos }, &rsp); err != nil { return nil, fmt.Errorf("GetProposal(%d, %d): %w", height, proposalID, err) } - return (*nodeapi.Proposal)(rsp), nil + return (*nodeapi.Proposal)(convertProposal(rsp)), nil } func (c *ConsensusApiLite) GrpcConn() connections.GrpcConn { diff --git a/storage/oasis/nodeapi/eden/convert.go b/storage/oasis/nodeapi/eden/convert.go index 5d329a42c..f9aeeb740 100644 --- a/storage/oasis/nodeapi/eden/convert.go +++ b/storage/oasis/nodeapi/eden/convert.go @@ -5,18 +5,15 @@ import ( "github.com/oasisprotocol/oasis-core/go/common/cbor" "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-core/go/common/quantity" coreCommon "github.com/oasisprotocol/oasis-core/go/common" "github.com/oasisprotocol/nexus/coreapi/v22.2.11/common/node" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" governance "github.com/oasisprotocol/nexus/coreapi/v22.2.11/governance/api" registry "github.com/oasisprotocol/nexus/coreapi/v22.2.11/registry/api" "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api/message" scheduler "github.com/oasisprotocol/nexus/coreapi/v22.2.11/scheduler/api" staking "github.com/oasisprotocol/nexus/coreapi/v22.2.11/staking/api" - upgrade "github.com/oasisprotocol/nexus/coreapi/v22.2.11/upgrade/api" apiTypes "github.com/oasisprotocol/nexus/api/v1/types" "github.com/oasisprotocol/nexus/common" @@ -33,41 +30,6 @@ import ( stakingEden "github.com/oasisprotocol/nexus/coreapi/v24.0/staking/api" ) -func convertProposal(p *governanceEden.Proposal) *governance.Proposal { - results := make(map[governance.Vote]quantity.Quantity) - for k, v := range p.Results { - results[governance.Vote(k)] = v - } - - var up *governance.UpgradeProposal - if p.Content.Upgrade != nil { - up = &governance.UpgradeProposal{ - Descriptor: upgrade.Descriptor{ - Versioned: p.Content.Upgrade.Descriptor.Versioned, - Handler: upgrade.HandlerName(p.Content.Upgrade.Descriptor.Handler), - Target: p.Content.Upgrade.Descriptor.Target, - Epoch: p.Content.Upgrade.Descriptor.Epoch, - }, - } - } - - return &governance.Proposal{ - ID: p.ID, - Submitter: p.Submitter, - State: governance.ProposalState(p.State), - Deposit: p.Deposit, - Content: governance.ProposalContent{ - Upgrade: up, - CancelUpgrade: (*governance.CancelUpgradeProposal)(p.Content.CancelUpgrade), - ChangeParameters: (*governance.ChangeParametersProposal)(p.Content.ChangeParameters), - }, - CreatedAt: p.CreatedAt, - ClosesAt: p.ClosesAt, - Results: results, - InvalidVotes: p.InvalidVotes, - } -} - func convertAccount(a *stakingEden.Account) *staking.Account { rateSteps := make([]staking.CommissionRateStep, len(a.Escrow.CommissionSchedule.Rates)) for i, r := range a.Escrow.CommissionSchedule.Rates { @@ -162,12 +124,7 @@ func convertNode(signedNode *nodeEden.MultiSignedNode) (*node.Node, error) { // nexus-internal format. // WARNING: This is a partial conversion, only the fields that are used by // Nexus are filled in the output document. -func ConvertGenesis(d genesisEden.Document) (*genesis.Document, error) { - proposals := make([]*governance.Proposal, len(d.Governance.Proposals)) - for i, p := range d.Governance.Proposals { - proposals[i] = convertProposal(p) - } - +func ConvertGenesis(d genesisEden.Document) (*nodeapi.GenesisDocument, error) { voteEntries := make(map[uint64][]*governance.VoteEntry, len(d.Governance.VoteEntries)) for k, v := range d.Governance.VoteEntries { voteEntries[k] = make([]*governance.VoteEntry, len(v)) @@ -234,14 +191,12 @@ func ConvertGenesis(d genesisEden.Document) (*genesis.Document, error) { } } - return &genesis.Document{ - Height: d.Height, - Time: d.Time, - ChainID: d.ChainID, - Governance: governance.Genesis{ - Proposals: proposals, - VoteEntries: voteEntries, - }, + return &nodeapi.GenesisDocument{ + Height: d.Height, + Time: d.Time, + ChainID: d.ChainID, + BaseEpoch: uint64(d.Beacon.Base), + Governance: d.Governance, Registry: registry.Genesis{ Entities: d.Registry.Entities, Runtimes: runtimes, @@ -481,13 +436,9 @@ func convertGovernanceEvent(e governanceEden.Event) nodeapi.Event { } case e.ProposalFinalized != nil: ret = nodeapi.Event{ - GovernanceProposalFinalized: &nodeapi.ProposalFinalizedEvent{ - ID: e.ProposalFinalized.ID, - // The enum is compatible between Eden and Damask. - State: governance.ProposalState(e.ProposalFinalized.State), - }, - RawBody: common.TryAsJSON(e.ProposalFinalized), - Type: apiTypes.ConsensusEventTypeGovernanceProposalFinalized, + GovernanceProposalFinalized: (*nodeapi.ProposalFinalizedEvent)(e.ProposalFinalized), + RawBody: common.TryAsJSON(e.ProposalExecuted), + Type: apiTypes.ConsensusEventTypeGovernanceProposalExecuted, } case e.Vote != nil: ret = nodeapi.Event{ diff --git a/storage/oasis/nodeapi/eden/node.go b/storage/oasis/nodeapi/eden/node.go index 6398506b1..4fc3374da 100644 --- a/storage/oasis/nodeapi/eden/node.go +++ b/storage/oasis/nodeapi/eden/node.go @@ -13,7 +13,6 @@ import ( beacon "github.com/oasisprotocol/nexus/coreapi/v22.2.11/beacon/api" consensus "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api" consensusTx "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api/transaction" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" roothash "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api" "github.com/oasisprotocol/nexus/storage/oasis/connections" @@ -52,7 +51,7 @@ func (c *ConsensusApiLite) Close() error { return c.grpcConn.Close() } -func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error) { +func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*nodeapi.GenesisDocument, error) { var rsp genesisEden.Document if err := c.grpcConn.Invoke(ctx, "/oasis-core.Consensus/GetGenesisDocument", nil, &rsp); err != nil { return nil, fmt.Errorf("GetGenesisDocument(eden): %w", err) @@ -60,7 +59,7 @@ func (c *ConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext return ConvertGenesis(rsp) } -func (c *ConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error) { +func (c *ConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*nodeapi.GenesisDocument, error) { var rsp genesisEden.Document if err := c.grpcConn.Invoke(ctx, "/oasis-core.Consensus/StateToGenesis", height, &rsp); err != nil { return nil, fmt.Errorf("StateToGenesis(%d): %w", height, err) @@ -237,7 +236,7 @@ func (c *ConsensusApiLite) GetProposal(ctx context.Context, height int64, propos }, &rsp); err != nil { return nil, fmt.Errorf("GetProposal(%d, %d): %w", height, proposalID, err) } - return (*nodeapi.Proposal)(convertProposal(rsp)), nil + return (*nodeapi.Proposal)(rsp), nil } func (c *ConsensusApiLite) GrpcConn() connections.GrpcConn { diff --git a/storage/oasis/nodeapi/file/consensus.go b/storage/oasis/nodeapi/file/consensus.go index 249d9e8c0..fe8398100 100644 --- a/storage/oasis/nodeapi/file/consensus.go +++ b/storage/oasis/nodeapi/file/consensus.go @@ -9,7 +9,6 @@ import ( beacon "github.com/oasisprotocol/nexus/coreapi/v22.2.11/beacon/api" consensus "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" roothash "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api" "github.com/oasisprotocol/nexus/cache/kvstore" @@ -57,21 +56,21 @@ func (c *FileConsensusApiLite) Close() error { return firstErr } -func (c *FileConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error) { +func (c *FileConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*nodeapi.GenesisDocument, error) { return kvstore.GetFromCacheOrCall( c.db, false, - // v3: Added proposal invalid votes. - kvstore.GenerateCacheKey("GetGenesisDocument.v3", chainContext), - func() (*genesis.Document, error) { return c.consensusApi.GetGenesisDocument(ctx, chainContext) }, + // v4: Introduced nexus-internal GenesisDocument type. + kvstore.GenerateCacheKey("GetGenesisDocument.v4", chainContext), + func() (*nodeapi.GenesisDocument, error) { return c.consensusApi.GetGenesisDocument(ctx, chainContext) }, ) } -func (c *FileConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error) { +func (c *FileConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*nodeapi.GenesisDocument, error) { return kvstore.GetFromCacheOrCall( c.db, height == consensus.HeightLatest, - // v3: Added proposal invalid votes. - kvstore.GenerateCacheKey("StateToGenesis.v3", height), - func() (*genesis.Document, error) { return c.consensusApi.StateToGenesis(ctx, height) }, + // v4: Introduced nexus-internal GenesisDocument type. + kvstore.GenerateCacheKey("StateToGenesis.v4", height), + func() (*nodeapi.GenesisDocument, error) { return c.consensusApi.StateToGenesis(ctx, height) }, ) } diff --git a/storage/oasis/nodeapi/history/history.go b/storage/oasis/nodeapi/history/history.go index f63ef7979..3afa8d2fe 100644 --- a/storage/oasis/nodeapi/history/history.go +++ b/storage/oasis/nodeapi/history/history.go @@ -8,7 +8,6 @@ import ( beacon "github.com/oasisprotocol/nexus/coreapi/v22.2.11/beacon/api" consensus "github.com/oasisprotocol/nexus/coreapi/v22.2.11/consensus/api" - genesis "github.com/oasisprotocol/nexus/coreapi/v22.2.11/genesis/api" roothash "github.com/oasisprotocol/nexus/coreapi/v22.2.11/roothash/api" "github.com/oasisprotocol/nexus/config" @@ -120,7 +119,7 @@ func (c *HistoryConsensusApiLite) APIForChainContext(chainContext string) (nodea return api, nil } -func (c *HistoryConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error) { +func (c *HistoryConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*nodeapi.GenesisDocument, error) { api, err := c.APIForChainContext(chainContext) if err != nil { return nil, fmt.Errorf("getting api for chain context %s: %w", chainContext, err) @@ -128,7 +127,7 @@ func (c *HistoryConsensusApiLite) GetGenesisDocument(ctx context.Context, chainC return api.GetGenesisDocument(ctx, chainContext) } -func (c *HistoryConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error) { +func (c *HistoryConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*nodeapi.GenesisDocument, error) { api, err := c.APIForHeight(height) if err != nil { return nil, fmt.Errorf("getting api for height %d: %w", height, err) From 24136729e78daed26c4e56bc4004096916e04c56 Mon Sep 17 00:00:00 2001 From: ptrus Date: Fri, 19 Jul 2024 11:18:34 +0200 Subject: [PATCH 2/2] tests/e2e: update caches --- .changelog/725.feature.md | 1 + .../damask/rpc-cache/consensus/00000-1.psg | 4 ++-- .../damask/rpc-cache/consensus/00000-1.psg.pmt | Bin 621 -> 621 bytes .../damask/rpc-cache/consensus/index.pmt | Bin 663 -> 663 bytes .../damask/rpc-cache/consensus/main.pix | 2 +- .../damask/rpc-cache/emerald/db.pmt | Bin 555 -> 555 bytes .../https_sourcify_dev_server/main.pix | 2 +- .../https_sourcify_dev_server/overflow.pix | 4 ++-- .../eden/rpc-cache/consensus/00000-1.psg | 4 ++-- .../eden/rpc-cache/consensus/00000-1.psg.pmt | Bin 621 -> 621 bytes .../eden/rpc-cache/consensus/index.pmt | Bin 658 -> 658 bytes .../eden/rpc-cache/consensus/overflow.pix | 2 +- .../https_sourcify_dev_server/main.pix | 2 +- .../https_sourcify_dev_server/overflow.pix | 4 ++-- .../edenfast/rpc-cache/consensus/00000-1.psg | 4 ++-- .../rpc-cache/consensus/00000-1.psg.pmt | Bin 621 -> 621 bytes .../edenfast/rpc-cache/consensus/index.pmt | Bin 658 -> 658 bytes .../edenfast/rpc-cache/consensus/main.pix | 2 +- .../edenfast/rpc-cache/consensus/overflow.pix | 4 ++-- 19 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 .changelog/725.feature.md diff --git a/.changelog/725.feature.md b/.changelog/725.feature.md new file mode 100644 index 000000000..5ba4cb5df --- /dev/null +++ b/.changelog/725.feature.md @@ -0,0 +1 @@ +consensus/proposals: Add support for proposal metadata diff --git a/tests/e2e_regression/damask/rpc-cache/consensus/00000-1.psg b/tests/e2e_regression/damask/rpc-cache/consensus/00000-1.psg index a7d55b059..e52cac0bc 100644 --- a/tests/e2e_regression/damask/rpc-cache/consensus/00000-1.psg +++ b/tests/e2e_regression/damask/rpc-cache/consensus/00000-1.psg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a14460ab9564e5c07c013f11e6cb85826a12670b802d00c74fc0c9024dbc25ab -size 43761833 +oid sha256:a1f2a4247d47428cb659211d7c77f57cc9c1fdc0c0c4507276d51cc2a5ebb037 +size 52837002 diff --git a/tests/e2e_regression/damask/rpc-cache/consensus/00000-1.psg.pmt b/tests/e2e_regression/damask/rpc-cache/consensus/00000-1.psg.pmt index 6cde663ef02f816c7b965740c78f7a47738ad144..214188ef1ec1dc64f35b7f110ec28d37d77115f4 100644 GIT binary patch delta 10 RcmaFM@|I;oHWO1b0{|F51BCzp delta 10 RcmaFM@|I;oHWO150{|F31B3to diff --git a/tests/e2e_regression/damask/rpc-cache/consensus/index.pmt b/tests/e2e_regression/damask/rpc-cache/consensus/index.pmt index ca7089dab03e06c5e75b2d706adf6f55bc0470cc..abe8fbe97643e1797431224d3b200e55e2d7a1bc 100644 GIT binary patch delta 22 ecmbQvI-PYxClg;Y<3FZHjQ<}oGX67RU;qGK<_G=& delta 22 ecmbQvI-PYxClg;2<3FZHjQ<}oGX67RU;qGK*a!Up diff --git a/tests/e2e_regression/damask/rpc-cache/consensus/main.pix b/tests/e2e_regression/damask/rpc-cache/consensus/main.pix index 9da3ebc04..bd65c1601 100644 --- a/tests/e2e_regression/damask/rpc-cache/consensus/main.pix +++ b/tests/e2e_regression/damask/rpc-cache/consensus/main.pix @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:badc51e73ba2ce9b83ae0f22ed1d8edd0f37284f165c98c8967d23080f9a466e +oid sha256:3a6de009d381023c923d45d22caa0ca94af99550c28685548d44f1cc06854eec size 378368 diff --git a/tests/e2e_regression/damask/rpc-cache/emerald/db.pmt b/tests/e2e_regression/damask/rpc-cache/emerald/db.pmt index bcd05960950312bf6af724d2fc54931fc5d60a67..04550df35cd20e52481e7782a73217968a4e27bb 100644 GIT binary patch delta 13 UcmZ3@vYKUs8WZb_Z65jz03eS9Q2+n{ delta 13 UcmZ3@vYKUs8WZcC@0^JY03iMZc>n+a diff --git a/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/main.pix b/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/main.pix index c42d7e0ce..dbe6d26cf 100644 --- a/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/main.pix +++ b/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/main.pix @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8abc771fb51aaf90e9e6a875f561f69278c5b1c56cf7266ad017afe7c81eb212 +oid sha256:eb48b7b0883ec6d354b263a7db85b966094c8f5282d1cd6aed4f9666910cd8a0 size 2560 diff --git a/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/overflow.pix b/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/overflow.pix index 8833e9889..cf75b0cb6 100644 --- a/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/overflow.pix +++ b/tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/overflow.pix @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f50fac4d9ac89ecc22d8a39769fabf88332d09a16e5d4d805eaa23a30c50e64 -size 512 +oid sha256:45c5c1952055306d26228304d867b0e40a5654a6f0fa7b3cbe6bc11f9c63fe5a +size 1024 diff --git a/tests/e2e_regression/eden/rpc-cache/consensus/00000-1.psg b/tests/e2e_regression/eden/rpc-cache/consensus/00000-1.psg index 4da0e2d28..b449fec5f 100644 --- a/tests/e2e_regression/eden/rpc-cache/consensus/00000-1.psg +++ b/tests/e2e_regression/eden/rpc-cache/consensus/00000-1.psg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d4e50912f5a0200ea4079bad748b7a74b42ce8ee0c1d984db12f81bf832af929 -size 55507870 +oid sha256:5067dc2ba93888a03906677e388a3a542e7d38871104c1941c48270db1b9041b +size 70572082 diff --git a/tests/e2e_regression/eden/rpc-cache/consensus/00000-1.psg.pmt b/tests/e2e_regression/eden/rpc-cache/consensus/00000-1.psg.pmt index 6cde663ef02f816c7b965740c78f7a47738ad144..214188ef1ec1dc64f35b7f110ec28d37d77115f4 100644 GIT binary patch delta 10 RcmaFM@|I;oHWO1b0{|F51BCzp delta 10 RcmaFM@|I;oHWO150{|F31B3to diff --git a/tests/e2e_regression/eden/rpc-cache/consensus/index.pmt b/tests/e2e_regression/eden/rpc-cache/consensus/index.pmt index eb4ed5fb1e0116f9d2ca2a26c1f0a56791372e08..ad5729147a2747c4bdb01707b16efb97ad970213 100644 GIT binary patch delta 17 ZcmbQlI*D~dClhBg<3FZHjQ<}o001|G2D<