Skip to content

Commit

Permalink
Final cleaning before release
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Sep 1, 2024
1 parent df247f5 commit 12c8928
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 4 deletions.
35 changes: 35 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

This file details changes made to TrueBlocks over time. All version prior to version 3.0.0 are now no longer supported.

## v4.0.0 - Kicking Ass (2024/09/01)

- Bumped version to 4.0.0
- Improved auto code generation to include sorting on appropriate types (x, y, z)
- Addition of Names capability to any routes that need to load names databases (most)
- Better ability to generate auto-generated code outside of core or the SDK (for example Browse)
- Better checking of certain validations such as Enums being found in validate code for a route
- Data models
- Removes TimestampCount type for more general Count type which is now used in other places
- Much easier to use caching code. Interface now requires an implementation of `CacheLocation` (no longer needs `CacheId` nor `CacheName`)
- Add ForEveryFileInFolder to walk package - super useful
- Adds Scrape endpoint to the SDK - enabling trueBlocks-node functionality
- Various updates to examples and tests
- Changes to better support builds on other operating sytems. Mostly path related. Not an endorsement of a Windows (or any other operating systems) versions.
- TimestampCount field removed from chifra when and replaced with more generic Count type which is now used elsehwere.
- Moved name type enums (Custom, Regular, etc) to types package removing it from names package. This was done to better support Browse. This is a breaking change.
- Types
- chifra scrape now returns Message type
- Monitor type now supports binary caching
- Removes simponly attribute from auto code gen field attributes
- Adds rangeDates field to ChunkAddress, ChunkStats, ChunkBloom, ChunkIndex, ChunkRecord
- Remove rangeEnd from ChunkStats (in favor of rangeDates) breaking
- Adds sorts option for auto-gen fields.csv file to create sorting code for a given type to names, functions, abis
- Adds name, path, fileSize, lastModDate, isKnown, nFunctions, nEvents, hasConstructor, hasFallback to Abi type
- Adds isStaged, isEmpty, and name to Monitor type
- Removes staged and removed from MonitorClean type - breaking
- Adds chifra monitors --count and chifra monitors --staged. Changes hotkey to 'd' from 'c' for chifra monitors --commands option.
- ADDS fileSize, hasConstructor, hasFallback, isEmpty, isKnown, lastModDate, nEvents, nFunctions, name, path to Abi type mostly for use in apps such as Browse
- Adds hidden option chifra explore --dalle <address>
- Adds chifra abis --list and chifra abis --count
- chifra daemon --api deprecated, no replacement, chifra daemon --scrape deprecated, use chifra scrape instead chifra daemon --monitor deprecated, use chifra monitors --watch instead.
- chifra chunks mode --count now properly returns a Count type (breaking)
- Implements sorts in the sdk for Abis, Names, Chunks, etc.
- monitorClean now has staged and removed fields

## v3.1.2-release - Streaming SDK - Huntingdon (2024/07/18)

**Summary**
Expand Down
1 change: 1 addition & 0 deletions src/apps/chifra/internal/chunks/handle_pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func matches(local, remote *types.ChunkRecord) (bool, bool) {
}

func (opts *ChunksOptions) matchReport(matches bool, localHash, remoteHash base.IpfsHash) {
_ = remoteHash // linter
if !opts.Remote || !config.IpfsRunning() {
return // if we're not pinning in two places, don't report on matches
}
Expand Down
1 change: 1 addition & 0 deletions src/apps/chifra/internal/chunks/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (opts *ChunksOptions) validateChunks() error {
}

if opts.Count {
// TODO: Shouldn't this use validate.Enums?
if !strings.Contains("manifest|index|blooms|pins|stats", opts.Mode) {
return validate.Usage("The {0} option is only available in {1}.", "--count", "these modes: manifest|index|blooms|pins|stats")
}
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/explore/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (t ExploreType) String() string {
}

func (opts *ExploreOptions) idToBlockHash(chain, arg string, isBlockHash func(arg string) bool) (base.Hash, error) {
_ = chain // delint
_ = chain // linter
if isBlockHash(arg) {
return opts.Conn.GetBlockHashByHash(arg)
}
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/pkg/file/lock_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ func Lock(file *os.File) error {
}

func Unlock(file *os.File) error {
// TODO: DOn't we need this?
// TODO: Don't we need this?
return nil
}
2 changes: 1 addition & 1 deletion src/apps/chifra/pkg/names/regular.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func loadRegularMap(chain string, terms []string, parts types.Parts, ret *map[ba

// loadKnownBadresses loads the known bad addresses from the cache
func loadKnownBadresses(unused string, terms []string, parts types.Parts, ret *map[base.Address]types.Name) error {
_ = unused
_ = unused // linter
knownBadAddresses := []types.Name{
{
Address: base.PrefundSender,
Expand Down
2 changes: 1 addition & 1 deletion src/dev_tools/sdkFuzzer/monitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ func DoMonitors() {
// sleep is not fuzzed
// Fuzz Loop
// EXISTING_CODE
_ = staged
_ = delete
_ = undelete
_ = remove
_ = watch
_ = globs
_ = staged
opts = sdk.MonitorsOptions{
Addrs: []string{fuzzAddresses[0]},
}
Expand Down

0 comments on commit 12c8928

Please sign in to comment.