-
Notifications
You must be signed in to change notification settings - Fork 33
Changelog Utility
user_name edited this page Jun 29, 2023
·
22 revisions
All notable changes to this module will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add trustless relay validation: available service tokens for the application
- Add HTTP relay execution logic to servicer
- Adds servicer, fisherman, and validator utility modules
- Implemented
GetIndexedTransaction - Add some comments and rename a few functions throughout to have things be more self-explanatory
- Moved over all the business logic related to getting "signer candidates" into its own file for readability purposes
- Add a place-holder Servicer implementation
- Use mockgen and Bus for DI
- Cross-check the chains handled by a servicer using the Persistence module
- Added a utility feature list with must-have and nice-to-haves for MainNet and TestNet
- Added the E2E Feature Path Template to document, present and explain how to go about defining and scoping utility level features
- Expose
HandleTransactionfor use outside of utility - Add placeholder functions
HandleRelay()andHandleChallenge() - Moved
utility/types/errors.gointoshared/core/typesand updated their usage accordingly
- Rename
TxResulttoIndexedTransaction
- Introduced testing helper to test the
UtilityModuleinterface implementation - Implemented the
GetSessionfunction from the Utility module interface - Added a
sessionHydratorstructure used to populate a new session
- Remove utility specific
TxResultprotobuf and interface - Utilize the
TxResultprotobuf inshared/core/types
- Add wrapper functions for
GetParameter() - Add generic governance parameter accessor functions
getParamOwner()andgetGovParam() - Refactor governance parameter accessor functions to use general wrapper functions
- Clean up tests
- Renamed
CreateAndApplyProposalBlocktoCreateProposalBlock - Added
GetPrevBlockByzantineValidatorsandProposalBlockNotSeterrors - Instrumented
CreateProposalBlockandApplyBlockwith log statements - Refactored functions for block creation and application to be more readable/modular
- Added TODOs for future refactoring
- Renamed
utouowfor consistency - Added
stateHashvalidation againstproposalBlock - Added feature flag for
stateHashvalidation (for testing purposes) - Updated tests accordingly
- Updated to reflect pools address changes
- Improved logging throughout the module
- Refactored
utilityContextintoutilityUnitOfWork - Added
utilityUnitOfWorkFactoryto createutilityUnitOfWorkinstances depending on the fact that the current node isLeaderorReplica - Updated tests
- Fixed bug where we were not removing txs from the mempool of replicas
- Added thorough documentation in different parts of the codebase
- Replace the
Store()function with a.storeaccessor - Removed the unnecessary
getStoreAndHeight()function - Simplified
calculateMaxAppRelaysto a temporarycalculateAppSessionTokensimplementation - Improved the readability of the
Blocklifecycle andMessagevalidation - Simplified the testing utilities used
- Updated the
sessioninterface - Renamed
applyTxtohydrateTxand added documentation on its functionality - Removed
DefaultTxResultand added documentation toTxResultresult
- Update logger value references with pointers
- Fix module test after logger refactor
- Rename ServiceNode Actor Type Name to Servicer
- Module embeds
base_modules.IntegratableModuleandbase_modules.InterruptableModulefor DRYness - Logging error if
ApplyTransactionfails (it was completely ignored before and it was really hard to understand what was going on)
- Added a
Validatabletype for basic validation - Split business logic specific to certain actors (e.g. validator reward, app relays, message handling) into separate files
- Reduced the scope of functions and types that shouldn’t be exposed
- Upgraded the actors tests - a lot went here to help with understanding what’s going on but it’s still just a start
- Remove the
Contextstruct; unnecessary abstraction - Added comments and guidance on message, transaction and signature validation
- Added
ITransaction, an interface for theTransactionprotocol to help capture the functionality it adds to the core type - DOC: Delineate between unstaking & unbonding in a few places throughout the codebase
- BUG:
tx.Equalswas comparing the same transaction against itself (major bug) - BUG:
StakingStatusenums in utility did not reflect the same protocol as in persistence (needs to be consolidated)
- Documentation update
- Address legacy linter errors from
golangci-lint
- Changed readme to remove $ sign from code blocks
- Changed log lines to utilize new logger module.
- Introduced
txFIFOMempoolwhich extends the newGenericFIFOSetin order to replace the legacy logic - Added tests for
txFIFOMempool - Accessing
TxMempoolvia thebusinutilityContext
- Updated
TestUtilityContext_SetPoolAmount,TestUtilityContext_GetMessageEditStakeSignerCandidates,TestUtilityContext_GetMessageUnpauseSignerCandidates,TestUtilityContext_GetMessageUnstakeSignerCandidates, andTestUtilityContext_UnstakePausedBeforeto correct misplaced expected and actual values in require.Equal.
- Remove
address []byteargument fromInsertPoolfunction
- Rewrite
interface{}toany
- Updated "test/module_test.go" to encorporate MaxConnsCount, MinConnsCount, MaxConnLifetime, MaxConnIdleTime, and HealthCheckPeriod in persistence config.
- Deprecated
GetBlocksPerSession()in favour of the more general parameter getter functionGetParameter() - Update unit test for
GetBlocksPerSession()to use theGetParameter()function
- Updated module constructor to accept a
busand not aruntimeMgranymore - Registering module with the
busviaRegisterModulemethod
- Renamed enum names as per code-review
- Using defaults from
test_artifactsfor tests - Updated tests to reflect the above changes
- Updated to use the new centralized config and genesis handling
- Updated to use the new
Actorstruct undercoreTypes - Updated tests and mocks
- Introduce
SetProposalBlockand local vars to keep proposal state - Maintaining proposal block state (proposer, hash, transactions) in local context
- Introduce a general purpose
HandleMessagemethod at the utility level - Move the scope of
CheckTransactionfrom the context to the module level - Add an
IsEmptyfunction to theMempool - Rename
DeleteTransactiontoRemoveTransactionin the mempool - Rename
LatestHeighttoHeightin theutilityContext - Add comments inside
CheckTransactionso its functionality is clearer - Add comments and cleanup the code in
mempool.go
- Minor lifecycle changes needed to supported the implementation of
ComputeAppHashas a replacement forGetAppHashin #285
- Propagating the
quorumCertificateappropriately on block commit - Removed
Latestfrom getters related to retrieving the context of the proposed block
- Remove
TxResultfrom the utility module interface (added in TxIndexer integration of transaction indexer (issue-#168) #302) - Combined creation and application of block in proposer lifecycle
- Added Relay Protocol interfaces and diagrams
- Added session interfaces and diagrams
- Moved
TxIndexerpackage to persistence module - Added new proto structure
DefaultTxResult - Integrated the
TxIndexerinto the lifecycle- Captured
TxResultfrom each played transaction - Moved the storage of transactions to the Consensus Module
- Returned the
TxResultsin theApplyBlock()andGetProposalTransactions() -
AnteHandleMessage()now returnssigner -
ApplyTransaction()returnsTxResult
- Captured
#235 Config and genesis handling
- Updated to use
RuntimeMgr - Made
UtilityModulestruct unexported - Updated tests and mocks
- Removed some cross-module dependencies
- Don't ignore the exit code of
m.Run()in the unit tests - Fixed several broken unit tests related to type casting
- Removed some unit tests (e.g.
TestUtilityContext_UnstakesPausedBefore) that were legacy and replaced by more general ones (e.g.TestUtilityContext_UnstakePausedBefore) - Avoid exporting unnecessary test helpers
- Remove unused
StoreBlockfunction from the utility module interface
- Created
UtilityConfig - Added
max_mempool_transaction_bytesandmax_mempool_transactionsto the utility config to allow dynamic configuration of the mempool - Matched configuration unmarshalling pattern of other modules
- Added V0 mempool default configurations
- Regenerated build files with new mempool config
- Consolidated
UtilActorTypeinutilityandutility/typestotypesUtil.ActorType - Deprecated all code in
actor.goand replaced with test helpers - Converted stake status to proto.enum (int32)
- Added DISCUSS items around shared code and
StakeStatus - Removed no-op
DeleteActorcode - Improved unit test for
UnstakeActorsThatAreReady() - Removed all usages of
fmt.Sprintf()from the testing package - Replaced all usages of
requre.True/require.Falsewithrequire.Equalunless checking a boolean - Added helper function for getting height and store for a readable and consistent
typesUtil.Errorvalue - Added testing.M argument to
newTestingPersistenceModule - Moved in-function literal arguments for
newTestingPersistenceModuleto private constants - Added the address parameter to
ErrInsufficientFundsfunction for easier debugging - Added unit test for
LegacyVote.ValidateBasic() - Added
ErrUnknownActorTypeto all switch statements onactorType - Removed
importofconsTypes(consensus module)
- Consolidated
TransactionHashto call a single implementation inshared/crypto/sha3 - Extracted function calls from places where we were using the same logic
Encapsulate structures previously in shared #163
- Ensured proto structures implement shared interfaces
-
UtilityConfiguses shared interfaces in order to acceptMockUtilityConfigin test_artifacts - Moved all utilty tests from shared to tests package
- Left
TODOfor tests package still importing persistence forNewTestPersistenceModule- This is one of the last places where cross-module importing exists
- Removed transaction fees from the transaction structure as fees will be enforced at the state level
- Removed actor specific messages (besides DoubleSign) and added actorType field to the struct
- Removed pause messages and functionality as it is out of scope for the current POS iteration
- Removed session and test-scoring as it's out of scope for the current POS iteration
- Consolidated unit test functionality for actors
- Modified pre-persistence to match persistence for Update(actor), 'amountToAdd' is now just 'amount'
- Added minimal 'proof of stake' implementation with few Pocket Specific terminologies and actors
- Structures
- Accounts
- Validators
- Fishermen
- Applications
- Servicers
- Pools
- Messages
- Stake
- Unstake
- EditStake
- Pause
- Unpause
- Send
- Structures
- Added initial governance params
Contents
- Home
- Persistence
- Changelog
-
Persistence
- Indexer
- Rpc
- Runtime
- State_Machine
-
Guides
- Roadmap
-
Guides
- Learning
- Guides
-
Guides
- Contributing
- Devlog
-
Guides
- Dependencies
-
Guides
- Releases
- Guides
- P2P
-
Shared
- Crypto
- Shared
-
Shared
- Modules
-
Build
- Config
- Consensus
-
Guides
- Telemetry
- Utility
- Logger