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

Develop #3828

Merged
merged 73 commits into from
Jul 18, 2024
Merged

Develop #3828

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
e1ec84a
Added SIGTERM to sigintTrap
dszlachta Apr 30, 2024
f7b929c
Revert "Added SIGTERM to sigintTrap"
dszlachta Apr 30, 2024
6209b40
Added context to scrape methods and simplified returned values
dszlachta May 6, 2024
4ec9197
Merge branch 'develop' into feature/handle_sigterm
tjayrush Jun 2, 2024
a698b60
Merge branch 'develop' into feature/handle_sigterm
tjayrush Jun 5, 2024
ef27261
Merge branch 'develop' into feature/handle_sigterm
tjayrush Jun 6, 2024
6f4d93b
Fixes build
tjayrush Jun 6, 2024
09d2dc3
Cleanup and quit
dszlachta Jun 6, 2024
906ceb1
Make sure we only call covalent once
dszlachta Jun 7, 2024
a1021f0
Merge pull request #3768 from TrueBlocks/bugfix/slurp_all
tjayrush Jun 7, 2024
4c1243d
Merge pull request #3730 from TrueBlocks/feature/handle_sigterm
tjayrush Jun 7, 2024
faa0db8
chore: make function comment match function name
threehonor Jun 12, 2024
1008d2d
Moved scrape.pid
dszlachta Jun 13, 2024
92b33d6
Merge pull request #3784 from threehonor/master
tjayrush Jun 13, 2024
c3cce93
Merge pull request #3785 from TrueBlocks/feature/move_scrape.pid_to_t…
dszlachta Jun 13, 2024
bd29195
chore: make function comment match function names
fudancoder Jun 13, 2024
e39d62c
Merge pull request #3786 from fudancoder/master
tjayrush Jun 28, 2024
f19d5fc
Bump braces from 3.0.2 to 3.0.3 in /sdk/typescript
dependabot[bot] Jun 28, 2024
14c291c
Merge pull request #3794 from TrueBlocks/dependabot/npm_and_yarn/sdk/…
tjayrush Jun 28, 2024
f91398a
Updates go.mod and go.sum throughout
tjayrush Jul 1, 2024
f6b98d7
Removes petnames from all code as unused
tjayrush Jul 1, 2024
e890cbe
Updates python and Typescript SDKs
tjayrush Jul 1, 2024
43183a8
Minimal changes to render better markdown from auto code
tjayrush Jul 1, 2024
3326961
Removes gRpc from daemon and names as unused
tjayrush Jul 1, 2024
6f3c7a8
Better UX for MakeBackup functionality
tjayrush Jul 1, 2024
bc77b91
Small update to SDK
tjayrush Jul 1, 2024
c32c97b
Adds a target for docker usage
tjayrush Jul 1, 2024
9944219
Adds version 1 of namesManager example app
tjayrush Jul 1, 2024
df61132
Updates goMods
tjayrush Jul 1, 2024
f1cd047
Enables name capability but does not implement it in globals
tjayrush Jul 1, 2024
7c795b1
Enables Names capability. If --verbose is given, any exported address…
tjayrush Jul 1, 2024
882ff11
Rewrites the names package to be more robust and remove unused code. …
tjayrush Jul 1, 2024
0ac892c
Implements better crudiness
tjayrush Jul 1, 2024
1c5a79d
Updates testing and adds some new test cases
tjayrush Jul 1, 2024
29963bc
Adds a ton of new names
tjayrush Jul 1, 2024
4580de6
Updates tests
tjayrush Jul 1, 2024
4314145
Merge pull request #3797 from TrueBlocks/names-epic-1
tjayrush Jul 2, 2024
261fd71
Fixed panic when slurping Covalent
dszlachta Jul 5, 2024
37987e1
Merge pull request #3798 from TrueBlocks/bugfix/slurp_covalent_panic
dszlachta Jul 5, 2024
c7cb33b
Feature/3783 replace viper (#3796)
dszlachta Jul 9, 2024
c4aaab6
Updates go.mod and go.sum throughout.
tjayrush Jul 14, 2024
86b5801
Merge pull request #3811 from TrueBlocks/3810-update-gomod-files
tjayrush Jul 14, 2024
c88120b
Modifies go.mod so we can make changes to local SDK
tjayrush Jul 15, 2024
c1e1453
Adds a new type, RenderCtx, that holds a CancelContext and the Cancel…
tjayrush Jul 15, 2024
3381954
Pushing the rCtx down from the SDK into chifra. Still not implemented…
tjayrush Jul 15, 2024
3429e84
Pushes the render context further down towards the Handlers. Still no…
tjayrush Jul 15, 2024
f218580
Pushes the render contexts down into the Handlers, but still does not…
tjayrush Jul 15, 2024
b9629fe
Replaces existing contexts and cancel functions with those now found …
tjayrush Jul 15, 2024
4f88330
For all concurrent loops for rendering data, add a test for the conso…
tjayrush Jul 15, 2024
ba58b68
Adds an example that shows how to use the cancel context
tjayrush Jul 15, 2024
5d85d67
Final cleaning, including sdkFuzzer
tjayrush Jul 15, 2024
95593eb
Merge pull request #3812 from TrueBlocks/feature/cancel-contexts-1
tjayrush Jul 15, 2024
b75502e
Closes issue #3815
tjayrush Jul 15, 2024
6e8fe80
Cleans up creation of new examples
tjayrush Jul 16, 2024
39264d0
New example, but it is not yet implemented.
tjayrush Jul 16, 2024
cc61a68
Modifies StreamMany to accept rCtx and if rCtx.ModelChan is non-nil, …
tjayrush Jul 16, 2024
7297ba2
Expands example to test names streaming also
tjayrush Jul 16, 2024
9963f03
Removes ProgressChan from RenderCtx as unused
tjayrush Jul 16, 2024
4e6c5e7
Enhances streaming example
tjayrush Jul 16, 2024
11e623b
Documents the example
tjayrush Jul 16, 2024
5671631
Adds func (a Address) CheckSum() string
tjayrush Jul 16, 2024
fa45147
Fixes a previously unknown bug
tjayrush Jul 17, 2024
1b5d3f1
Updating withStreaming example
tjayrush Jul 17, 2024
842803d
Updates go.mod files
tjayrush Jul 17, 2024
ae4652c
Final commit
tjayrush Jul 17, 2024
59a94eb
Much better balanceChart example
tjayrush Jul 17, 2024
c97fbb2
Adds simpleStreaming example and updates simple example's README
tjayrush Jul 18, 2024
616de9a
Removes simpleStreaming example
tjayrush Jul 18, 2024
baf63b4
Adjustments to balanceChart example
tjayrush Jul 18, 2024
3c62543
Updates go.mods
tjayrush Jul 18, 2024
16c1b81
Merge pull request #3822 from TrueBlocks/3814-epic-streaming-sdk
tjayrush Jul 18, 2024
e417b50
Last post before merge to master
tjayrush Jul 18, 2024
e50d207
Merge pull request #3827 from TrueBlocks/final/for-release
tjayrush Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
253 changes: 253 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,259 @@

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

## v3.1.0-release - Streaming SDK - Huntingdon (2024/07/01)

**Summary**

- Bumped version to v3.1.0-release.
- Major changes to the SDK to support streaming data models.
- Re-write of the chifra names command for easier usage.
- Re-write of most examples for clarity and ease of understanding.
- Added the RenderCtx to all Options types in the SDK to support cancel contexts and streaming data models.

## Changes to the Unchained Index Specification

- No changes.

## Breaking Changes

- No changes.

## System Wide Changes

- No changes.

## Changes to Data Models

- No changes.

### Modified data models

| model | description |
| ------ | ---------------------------------------------------------------------- |
| Blocks | No longer generic for --hashes option. Now just transactional details. |

### New data models

| model | description |
| ---------- | ------------------------------------------------------------------ |
| LightBlock | Used to be generic string version of Block, now a type of its own. |

### Removed data models

| model | description |
| ----- | ----------- |
| None | |

### Renamed data models

| model | description |
| ----- | ----------- |
| None | |

## Tool Specific Changes

**chifra list**

- No changes.

**chifra export**

- No changes.

**chifra monitors**

- No changes.

**chifra names**

- Removed pentane from Names data type
- Remove --grpc option from chifra names as unneeded
- Added nearly 12,000 names to the names database
- Near complete re-write of chifra names component - lots of cleanups
- Adds namesManager example application
- For any command that renders an address, adding `--verbose` now automatically names those addresses if they are found in the names database.
- Improved crud commands for `chifra names` and `chifra monitors`

**chifra abis**

- No changes.

**chifra blocks**

- No changes.

**chifra transactions**

- No changes.

**chifra receipts**

- No changes.

**chifra logs**

- No changes.

**chifra traces**

- No changes.

**chifra when**

- Minor bugfix related to TimeStamps
- Better backups for Timestamp editing

**chifra state**

- No changes.

**chifra tokens**

- No changes.

**chifra config**

- No changes.

**chifra status**

- No changes.

**chifra daemon**

- No changes.

**chifra scrape**

- Improvements to scraper including better Control+C handling in Docker version
- Better support for TOML file loading and environment variable overrides

**chifra chunks**

- No changes.

**chifra init**

- Added chifra init --examples option

**chifra explore**

- No changes.

**chifra slurp**

- No changes.

**makeClass**

- No changes.

**testRunner**

- No changes.

## Pull Requests (156)

<!--
gh pr list --search "is:pr is:closed closed:>2024-07-18" --limit 300 --state merged | cut -f1,2 | sed 's/^/- #/' | tr '\t' ' '
-->

- #3822 Epic: Streaming SDK - #3814
- #3812 Feature/cancel contexts 1
- #3811 Updates go.mod and go.sum throughout.
- #3798 Fixed panic when slurping Covalent
- #3797 Names epic
- #3796 Feature/3783 replace viper
- #3794 Bump braces from 3.0.2 to 3.0.3 in /sdk/typescript
- #3793 Bump golang.org/x/image from 0.10.0 to 0.18.0 in /examples/balanceChart
- #3786 chore: make function comment match function names
- #3785 Move scrape.pid to temp dir
- #3784 chore: make function comment match function name
- #3768 Make sure we only call covalent once
- #3762 Allows --version without an RPC endpoint
- #3760 Follow on to v3.0.0 release (#3759)
- #3759 Follow on to v3.0.0 release
- #3757 Develop
- #3755 Final cleaning for chifra chunks --pins tools
- #3750 v3.0.0 - Green - GoLang SDK

## Issues Closed (133)

<!--
gh issue list --search "closed:>2024-07-18 is:closed is:issue sort:created-desc" --limit 300 --state closed | cut -f1,3 | sort -r | sed 's/^/- #/' | tr '\t' ' '
-->

- #3823 Do we need progress reporting in core if we have streaming?
- #3821 Figure out if we need a buffered channel or a not buffered channel
- #3820 Extend this code into all Handlers
- #3819 Try to cause an error that gets pumped through the ErrorChan
- #3818 Feed an error through in the opts input (errors out before calling into fetchData)
- #3817 Push down into the HandleShow of ExportOptions. Should pass all tests
- #3816 Write a new example based on cancelChan that attaches channels
- #3815 Add ModelChan, ErrorChan, and ProgressChan to RenderCtx
- #3814 Epic: Streaming SDK
- #3810 Update go.mod files
- #3808 cancel ctx: Esc key
- #3807 cancel ctx: Push up one more level to the Wails app
- #3806 cancel ctx: Push cancel context up one level
- #3805 cancel ctx: Change Handler interfaces throughout
- #3804 cancel ctx: New type - RenderContext
- #3803 cancel ctx: Add missing contexts to Handlers
- #3802 cancel ctx: Make consistent
- #3801 cancel ctx: Review
- #3800 Cancel Contexts
- #3799 Cancel Contexts
- #3795 Add as many new names to the names database as possible
- #3782 chifra names - can we provide "aliases"?
- #3781 chifra names - need an "on-chain" name and a "user-supplied" name
- #3780 chifra names - testing
- #3779 chifra names - why do we have two files?
- #3778 chifra names - all tools that output any address (nearly all) should have --names option
- #3777 Names sharing
- #3776 Use a binary backing store for the names database
- #3775 ENS search names is not properly handled.
- #3774 Do not store names database in the repo - move it to the smart contract
- #3773 Simplify Crud Processing for chifra names
- #3772 chifra names - other notes
- #3771 openDatabaseFile destroy content of the file on open, does not recover on err. Empty file
- #3770 chifra names - create an example using Names to add, edit names.
- #3769 Crud processing
- #3767 chifra names - remove petnames as unused
- #3766 Why do we use PointerOf?
- #3764 chifra names - remove unused gRPC server code
- #3763 chifra names - epic
- #3749 chifra names autonamer doesn't work
- #3748 Timestamp file for unchained index for sepolia is currupted in smart contract
- #3742 Some commands and options are not available in the API
- #3705 use the names database when articulating
- #3321 chifra scrape - improved bloom filters
- #3288 chifra names -- names database should not be part of the repo
- #3287 chifra names - ERC20 tokens that are proxied are not identified as ERC20
- #2933 chifra names - --custom (and --all) test cases fail.

## Issues Opened (13)

<!--
gh issue list --search "created:>2024-07-18 is:open is:issue sort:created-desc" --limit 300 --state closed | cut -f1,3 | sort -r | sed 's/^/- #/' | tr '\t' ' '
-->

- #3826 Unneeded load of names
- #3825 FAQ: current directory is contained in a module that is not one of the workspace modules listed in go.work. You can add the module to the workspace using: go work use .
- #3824 Possible speedups for getting data from the node
- #3792 User comments
- #3791 Check for valid rpc provider during `func init`
- #3790 Change instructions to run chifra config --check
- #3789 Better Configuration
- #3788 state: add send functionality
- #3787 Automatic Index Publishing
- #3783 Replace viper for reading configuration
- #3761 Feat: Offer easier install methods
- #3758 Auto code gen should update something on the website that shows the current version.
- #3753 chifra chunks manifest --remote rewrites the manifest - it should not without --rewrite
- #3752 chifra chunks - could have a --generate option
- #3751 chifra manifest --pins

## v3.0.0-alpha (2024/06/01)

**Summary**
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- [Introduction](#introduction)
- [Installing](#installing)
- [Command Line](#command-line)
- [Command line](#command-line)
- [Chifra Serve](#chifra-serve)
- [Troubleshooting](#troubleshooting)
- [The unchained index](#the-unchained-index)
Expand Down Expand Up @@ -58,15 +58,6 @@ chifra daemon

Use `curl` to pull data or use it to drive our "pre-beta" Account Explorer. See [installing the explorer](https://trueblocks.io/docs/install/install-explorer/). The API provides the identical tools and options as the command line and it [documented here](https://trueblocks.io/api/).

**Generate gRPC files (developers only)**

To regenerate gRPC files, you have to install protobuf tools:
```[shell]
brew install protobuf # Mac
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
```

## Command line

The TrueBlocks command-line tool is called `chifra`. This gives you access to all the other tools:
Expand Down
7 changes: 1 addition & 6 deletions docs/content/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,7 @@ paths:
"name": "LibraToken",
"symbol": "LBA",
"source": "On chain",
"decimals": 18,
"petname": "actively-happy-mite"
"decimals": 18
},
{ "...": "..." }
]
Expand Down Expand Up @@ -3095,10 +3094,6 @@ components:
type: number
format: uint64
description: "number of decimals retrieved from an ERC20 smart contract, defaults to 18"
petname:
type: string
format: string
description: "the petname such as described here http://www.erights.org/elib/capability/pnml.html"
deleted:
type: boolean
format: boolean
Expand Down
13 changes: 5 additions & 8 deletions docs/content/chifra/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Usage:

Arguments:
mode - either show or edit the configuration
One of [ show | edit ]
One of [ show | edit ]

Flags:
-a, --paths show the configuration paths for the system
Expand Down Expand Up @@ -85,7 +85,7 @@ Usage:

Arguments:
modes - the (optional) name of the binary cache to report on, terse otherwise
One or more of [ index | blooms | blocks | transactions | traces | logs | statements | results | state | tokens | monitors | names | abis | slurps | staging | unripe | maps | some | all ]
One or more of [ index | blooms | blocks | transactions | traces | logs | statements | results | state | tokens | monitors | names | abis | slurps | staging | unripe | maps | some | all ]

Flags:
-d, --diagnose same as the default but with additional diagnostics
Expand Down Expand Up @@ -122,10 +122,7 @@ are provided not only by the command line, but also the API server. We call this
In the future, this daemon may also manage other long-running processes such as `chifra scrape`
and `chifra monitors`, but for now, it's only managing the API server.

The `--grpc` option turns on a GRPC server that may speed up certain command such as `chifra names`,
although this option is experimental and therefore not recommended for production use.

If the default port for the API server is in use, you may change it with the `--port` option.
If the default port for the API server is in use, you may change it with the `--url` option.

To get help for any command, please see the API documentation on our website. But, you may
also run `chifra --help` or `chifra <cmd> --help` on your command line to get help.
Expand All @@ -146,7 +143,6 @@ Aliases:

Flags:
-u, --url string specify the API server's url and optionally its port (default "localhost:8080")
-g, --grpc run gRPC server to serve names
--silent disable logging (for use in SDK for example)
-v, --verbose enable verbose output
-h, --help display this help screen
Expand All @@ -155,6 +151,7 @@ Notes:
- To start API open terminal window and run chifra daemon.
- See the API documentation (https://trueblocks.io/api) for more information.
- The --port option is deprecated, use --url instead.
- The --grpc option is deprecated, there is no replacement.
```

Data models produced by this tool:
Expand Down Expand Up @@ -328,7 +325,7 @@ Usage:

Arguments:
mode - the type of data to process (required)
One of [ manifest | index | blooms | pins | addresses | appearances | stats ]
One of [ manifest | index | blooms | pins | addresses | appearances | stats ]
blocks - an optional list of blocks to intersect with chunk ranges

Flags:
Expand Down
1 change: 0 additions & 1 deletion docs/content/data-model/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ Names consist of the following fields:
| symbol | the symbol for this address (retrieved from on-chain data if available) | string |
| source | user supplied source of where this name was found (or on-chain if name is on-chain) | string |
| decimals | number of decimals retrieved from an ERC20 smart contract, defaults to 18 | uint64 |
| petname | the petname such as described here http://www.erights.org/elib/capability/pnml.html | string |
| deleted | `true` if deleted, `false` otherwise | bool |
| isCustom | `true` if the address is a custom address, `false` otherwise | bool |
| isPrefund | `true` if the address was one of the prefund addresses, `false` otherwise | bool |
Expand Down
1 change: 1 addition & 0 deletions examples/balanceChart/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.png
*.svg
!ether_balances_ref.png
Loading
Loading