Skip to content

Fix oracle account sequence number increment logic#512

Merged
yzang2019 merged 1 commit intomasterfrom
yzang/SEI-2803
Jan 27, 2023
Merged

Fix oracle account sequence number increment logic#512
yzang2019 merged 1 commit intomasterfrom
yzang/SEI-2803

Conversation

@yzang2019
Copy link
Contributor

@yzang2019 yzang2019 commented Jan 27, 2023

Describe your changes and provide context

When broadcastTx hit an error, we should not increment the sequence number, we should refresh the current sequence number and use that for the next transaction request.

Testing performed to validate your change

@yzang2019 yzang2019 changed the title Fix orace account sequence number increment logic Fix oracle account sequence number increment logic Jan 27, 2023
@github-actions
Copy link

Code Coverage

Package Line Rate Complexity Health
github.com/sei-protocol/sei-chain/aclmapping/bank 83% 0
github.com/sei-protocol/sei-chain/aclmapping/dex 100% 0
github.com/sei-protocol/sei-chain/aclmapping/oracle 100% 0
github.com/sei-protocol/sei-chain/aclmapping/staking 82% 0
github.com/sei-protocol/sei-chain/aclmapping/tokenfactory 96% 0
github.com/sei-protocol/sei-chain/aclmapping/utils 0% 0
github.com/sei-protocol/sei-chain/aclmapping/wasm 83% 0
github.com/sei-protocol/sei-chain/app 59% 0
github.com/sei-protocol/sei-chain/app/antedecorators 75% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/config 85% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/oracle 72% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/oracle/provider 50% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/router/v1 45% 0
github.com/sei-protocol/sei-chain/store/whitelist/cachemulti 100% 0
github.com/sei-protocol/sei-chain/store/whitelist/kv 100% 0
github.com/sei-protocol/sei-chain/store/whitelist/multi 100% 0
github.com/sei-protocol/sei-chain/utils 46% 0
github.com/sei-protocol/sei-chain/utils/datastructures 90% 0
github.com/sei-protocol/sei-chain/x/dex 58% 0
github.com/sei-protocol/sei-chain/x/dex/cache 86% 0
github.com/sei-protocol/sei-chain/x/dex/client/cli/query 23% 0
github.com/sei-protocol/sei-chain/x/dex/contract 53% 0
github.com/sei-protocol/sei-chain/x/dex/exchange 89% 0
github.com/sei-protocol/sei-chain/x/dex/keeper 67% 0
github.com/sei-protocol/sei-chain/x/dex/keeper/abci 29% 0
github.com/sei-protocol/sei-chain/x/dex/keeper/msgserver 77% 0
github.com/sei-protocol/sei-chain/x/dex/keeper/query 82% 0
github.com/sei-protocol/sei-chain/x/dex/migrations 88% 0
github.com/sei-protocol/sei-chain/x/dex/types 1% 0
github.com/sei-protocol/sei-chain/x/dex/types/utils 100% 0
github.com/sei-protocol/sei-chain/x/dex/types/wasm 83% 0
github.com/sei-protocol/sei-chain/x/epoch 11% 0
github.com/sei-protocol/sei-chain/x/epoch/keeper 66% 0
github.com/sei-protocol/sei-chain/x/epoch/types 2% 0
github.com/sei-protocol/sei-chain/x/mint 0% 0
github.com/sei-protocol/sei-chain/x/mint/keeper 61% 0
github.com/sei-protocol/sei-chain/x/mint/simulation 95% 0
github.com/sei-protocol/sei-chain/x/mint/types 3% 0
github.com/sei-protocol/sei-chain/x/nitro/client/cli 45% 0
github.com/sei-protocol/sei-chain/x/nitro/keeper 80% 0
github.com/sei-protocol/sei-chain/x/nitro/replay 63% 0
github.com/sei-protocol/sei-chain/x/oracle 65% 0
github.com/sei-protocol/sei-chain/x/oracle/keeper 83% 0
github.com/sei-protocol/sei-chain/x/oracle/simulation 18% 0
github.com/sei-protocol/sei-chain/x/oracle/types 3% 0
github.com/sei-protocol/sei-chain/x/tokenfactory/keeper 85% 0
github.com/sei-protocol/sei-chain/x/tokenfactory/types 2% 0
Summary 15% (5055 / 34084) 0

@yzang2019 yzang2019 merged commit 34c0d1c into master Jan 27, 2023
masih pushed a commit that referenced this pull request Sep 29, 2025
## Describe your changes and provide context
Set tx checksum in sdk.ctx

## Testing performed to validate your change
masih pushed a commit that referenced this pull request Sep 30, 2025
## Describe your changes and provide context
Set tx checksum in sdk.ctx

## Testing performed to validate your change
wen-coding added a commit that referenced this pull request Feb 16, 2026
Extract generic A/B file persistence into a reusable consensus/persist/
sub-package and add block-file persistence for crash-safe availability
state recovery.

Changes:
- Move persist.go and persist_test.go into consensus/persist/ (git mv to
  preserve history), exporting Persister, NewPersister, WriteAndSync,
  SuffixA, SuffixB.
- Add persist/blocks.go: per-block file persistence using
  <lane_hex>_<blocknum>.pb files in a blocks/ subdirectory, with load,
  delete-before, and header-mismatch validation.
- Wire avail.NewState to accept stateDir, create A/B persister for
  AppQC and BlockPersister for signed lane proposals, and restore both
  on restart (contiguous block runs, queue alignment).
- Update avail/state.go to persist AppQC on prune and delete obsolete
  block files after each AppQC advance.
- Thread PersistentStateDir from consensus.Config through to
  avail.NewState.
- Expand consensus/inner.go doc comment with full persistence design
  (what, why, recovery, write behavior, rebroadcasting).
- Move TestRunOutputsPersistErrorPropagates to consensus/inner_test.go
  for proper package alignment.
- Add comprehensive tests for blocks persistence (empty dir, multi-lane,
  corrupt/mismatched skip, DeleteBefore, filename roundtrip).

Ref: sei-protocol/sei-v3#512
Co-authored-by: Cursor <cursoragent@cursor.com>
wen-coding added a commit that referenced this pull request Feb 17, 2026
Extract generic A/B file persistence into a reusable consensus/persist/
sub-package and add block-file persistence for crash-safe availability
state recovery.

Changes:
- Move persist.go and persist_test.go into consensus/persist/ (git mv to
  preserve history), exporting Persister, NewPersister, WriteAndSync,
  SuffixA, SuffixB.
- Add persist/blocks.go: per-block file persistence using
  <lane_hex>_<blocknum>.pb files in a blocks/ subdirectory, with load,
  delete-before, and header-mismatch validation.
- Wire avail.NewState to accept stateDir, create A/B persister for
  AppQC and BlockPersister for signed lane proposals, and restore both
  on restart (contiguous block runs, queue alignment).
- Update avail/state.go to persist AppQC on prune and delete obsolete
  block files after each AppQC advance.
- Thread PersistentStateDir from consensus.Config through to
  avail.NewState.
- Expand consensus/inner.go doc comment with full persistence design
  (what, why, recovery, write behavior, rebroadcasting).
- Move TestRunOutputsPersistErrorPropagates to consensus/inner_test.go
  for proper package alignment.
- Add comprehensive tests for blocks persistence (empty dir, multi-lane,
  corrupt/mismatched skip, DeleteBefore, filename roundtrip).

Ref: sei-protocol/sei-v3#512
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants