v0.10.0
[0.10] (October 16th, 2021)
Breaking Changes
-
BREAKING: We started adding an initial
context.Context
to all interruptible functions. All method performing an HTTP call have the new parameter as well as a bunch of other method. We cannot list all of them. If the caller already have acontext.Context
value, pass it to the function that now require one. Otherwise, simply passcontext.Background()
. -
BREAKING: Fixed binary unpacking of
BlockState
,TransactionTrace
,SignedTransaction
,Action
(and some inner types). This required changing a few struct fields to better fit with EOSIO definition, here the full list:-
MerkleRoot.ActiveNodes
is now a[]Checksum256
, was previously[]string
-
MerkleRoot.NodeCount
is now auint64
, was previouslyuint32
-
Type
EOSNameOrUint32
has been removed and replaced byPairAccountNameBlockNum
which is strictly typed now. -
BlockState.ProducerToLastProduced
is now[]PairAccountNameBlockNum
, was previously[][2]EOSNameOrUint32
. -
BlockState.ProducerToLastImpliedIRB
is now[]PairAccountNameBlockNum
, was previously[][2]EOSNameOrUint32
. -
BlockState.BlockID
is now aChecksum256
, was previouslystring
. -
BlockState.ActivatedProtocolFeatures
is now a*ProtocolFeatureActivationSet
, was previouslymap[string][]HexBytes
. -
BlockState.ConfirmCount
is now a[]uint8
, was previously[]uint32
. -
PendingSchedule.ScheduleHash
is now aChecksum256
, was previouslyHexBytes
. -
ActionTraceReceipt.ActionDigest
is now aChecksum256
, was previouslystring
. -
ActionTraceReceipt.CodeSequence
is now aVaruint32
, was previouslyUint64
. -
ActionTraceReceipt.ABISequence
is now aVaruint32
, was previouslyUint64
. -
ActionTrace.ActionOrdinal
is now aVaruint32
, was previouslyuint32
. -
ActionTrace.CreatorActionOrdinal
is now aVaruint32
, was previouslyuint32
. -
ActionTrace.ClosestUnnotifiedAncestorActionOrdinal
is now aVaruint32
, was previouslyuint32
. -
Except.Code
is now aInt64
, was previouslyint
. -
ExceptLogContext.Level
is now aExceptLogLevel
, was previouslystring
. -
ExceptLogContext.Line
is now auint64
, was previouslyint
.Note While those are flagged as breaking change to augment the visibility, they are really bug fixes to fit with the behavior of
nodeos
directly.
-
-
BREAKING: The decoding for ABI
variant
was not returning the correctjson
representation. Now ABIvariant
is returned as a two elements array, the first element being thevariant
type name as astring
and the second the actual value as JSON. For example, assuming avariant
type defined asgame_type: ["string", "uint32"]
, and afield
of typegame_type
, before, the JSON serialization would have looked like{"field":"some_string"}
or{"field":100}
while after the change, it will get serialized to the correct form{"field":["string", "some_string"]}
or{"field":["uint32", 100]}
.Note While this is flagged as breaking change to augment the visibility, this is really a bug fix to fit with the behavior of
nodeos
directly. -
BREAKING: The serialization for
ExtendedAsset
was aligned with theeos
codebase. Beforehand, it would serialize the field name"Contract"
with a capitalC
, and theAsset
field as"asset"
where it should have been"quantity"
. -
BREAKING: Renamed
ConsoleLog
toSafeString
for better re-usability in the codebase.
Added
- Proper handling for float precision in binary encoding/decoding.
- Added SHiP binary structures
- Added capabilities to read EOSIO Snapshot format (early implementation)
- Added architecture to support binary decoding/encoding Variant objects, see []
- Greatly improved performance of
NameToString
(~230%
) method. TimePoint
will decode with0
nanoseconds, when thefitNodeos
flag is set on the ABI.- Ability to decode a
int128
anduint128
in decimal format whenfitNodeos
flag is set on the ABI - Ability to decode nested
arrays
in ABI decoder. - Added
BlockState.Header
field of typeSignedBlockHeader
that was previously missing from the struct definition. - Added
BlockState.AdditionalSignatures
field of type[]ecc.Signature
that was previously missing from the struct definition. - Added
ActionTrace.ContextFree
field of typebool
that was previously missing from the struct definition. - Normalized all logging to use
streamingfast/logging
and its trace enabled support.
Changed
- All errors are wrapped using
fmt.Errorf("...: %w", ..., err)
which is standard now in Go.
Fixed
-
Optional encoding of primitive types.
A struct with a non-pointer type tagged with
eos:"optional"
is now properly encoded at the binary level. Important that means that for non-pointer type, when the value of the type is the "emtpy" value according to Golang rules, it will be written as not-present at the binary level. If it's something that you do want want, use a pointer to a primitive type. It's actually a good habit to use a pointer type for "optional" element anyway, to increase awarness. -
Fix json tags for delegatebw action data.
-
Unpacking binary
Except
now correctly works. -
Unpacking binary
Action
andActionTrace
now correctly works. -
Unpacking binary
TransactionTrace
now correctly works. -
Unpacking binary
TransactionReceipt
type will now correctly set the innerTransactionWithID.ID
field correctly. -
Unpacking binary
BlockState
now correctly works but is restricted to EOSIO 2.0.x version.
Deprecated
- Renamed
AccountRAMDelta
toAccountDelta
which is the correct name in EOSIO. - Renamed
JSONFloat64
toFloat64
, to follow the same convention that was changed years ago withUint64
, etc. Type alias left for backwards compatibility.
Detailed Changes
- 772b30b Added GitHub workflow
- 7cd7a57 Added SHIP structures, fixup of BaseVariant.
- a9d5402 Added
String()
method toTimePoint
andTimePointSec
- 4a80cd6 Added back support for golang 1.10
- 2b67efe Added helper method in system setcode
- 21f9a14 Added helpers in ABI type to
EncodeTable
andEncode
(any valid struct) - 1d323b9 Added init system func
- d07c6e0 Added int128 decimal support
- c16a0d3 Added method to append directly a private key to a KeyBag
- 562f9de Added more snapshot test
- 57f0eec Added multiple tests for block state
- 0a51422 Added possibility to override all key prefix
- 2c1feaa Added producer protocol feature support
- c61b3e5 Added release instructions
- 63c34d3 Added section handler error
- c69d7ea Added section name constants
- a9ca5dd Added snapshot tests
- e096816 Added some new section handler for Ultra
- 6d94af7 Added stringer support for eos type
- 746769b Added support for
get_accounts_by_authorizers
. - bf09fb1 Added support for
map<string, string>
action types - 15b8a30 Added system helper to activate protocol feature
- 47b8be1 Adding more context
- e3c3192 All errors are wrapped using
fmt.Errorf("...: %w", ..., err)
which is standard now in Go - 0daef5a All sections supported!
- 9ed9d7d All sections supported!
- 97d6c10 Allow to set
expected_core_symbol
when calling/v1/chain/get_account
RPC call viaclient.GetAccount
- ef30f40 BREAKING CHANGE: all API calls now require a
context.Context
as a first parameter, to allow for cancellation to propagate to long calls (or stalling calls on nodes that are overloaded). - c138ebf Bump github.com/tidwall/gjson from 1.3.2 to 1.6.5
- 16e0fe3 Deprecated
AccountRAMDelta
which is not the right name used in EOSIO - 850eeb8 First draft for blocks logs handling.
- 843f081 First draft of snapshot reading.
- c0dd979 Fix Variant decoding, added a few more tests
- 4255016 Fix system init action
- edcf181 Fix time_point format for fit nodeos
- 5e090ae Fix timepoint formatting to fit nodeos
- f68c757 Fix token issue action permission
- fef658a Fixed BaseVariant JSON support
- f6651dd Fixed JSON decoding of PairAccountNameBlockNum
- 85d059b Fixed
BlockState
ConfirmedCount
not of the right type, should have been a[]uint8
- 6ca8107 Fixed bug when precision is
MaxUint8
- 0f5cba4 Fixed decoding or array at the fiels and alias level
- 24c0eb7 Fixed encoding of optional primitive types as well as
*Uint64
types - c64178e Fixed fcVariant
ToNative
when encountering aint64
type id - 271bfac Fixed formatting of sub-list
- a6a5bd6 Fixed tests with TimePointSec
- 6e32ae2 Fixed unit tests for P2P
- 50a7dfd GetTableByScopeResp.more is string now.
- a7047d5 Greatly improved efficiency of
NameToString
- bcdc4bb Improve binary unpacking of some core
nodeos
types - 96d4aeb Improved panic error message in MustStringToSymbol
- e9ea3e4 Improvements to Uint128, Int128 & Float128
DecimalString
andMarshalJSON
implementation - 8bfe0e8 Just one left!
- 2505e99 Just one left!
- f48ae43 Merge branch 'develop' into feature/snapshot
- a729145 Merge branch 'develop' of github.com:eoscanada/eos-go into develop
- 1b19518 Merge branch 'feature/more-context'
- 5548ad4 Merge pull request #135 from zhaoyilun/master
- 0a84410 Merge pull request #138 from crazybits/master
- d58292a Merge pull request #154 from keisuke-kanao/fix-serialization-of-TimePointSec
- 0940450 Merge pull request #159 from eoscanada/dependabot/go_modules/github.com/tidwall/gjson-1.6.5
- cce276e Merge remote-tracking branch 'origin/feature/snapshot' into develop
- 6c90f08 Normalized logging behavior of library
- 9473dee Now support a bunch of other snapshot sections. Better support for the different index types in contract tables.
- 55261c7 Now support a bunch of other snapshot sections. Better support for the different index types in contract tables.
- 12388aa Prepare for 0.10 release
- fbb4f58 Quick internal rename
- 48d4609 Read account objects w/ ABI, read block state, read contract rows!
- a51e41d Remodel abidecoder. Muuuccho better.
- 25383d5 Remove sample test
- d4a45e0 Remove some dead code
- cf71bc4 Removed
bnet
subpackage. Deprecated upstream, never used. - 39ef3b2 Removed
omitempty
onAccountRAMDeltas
ofTransactionTrace
- 32f7e46 Removed leftover PrintStack call in CurveID
String
implementation - 5fdac80 Removed leftover spew.Dump calls
- c00dd74 Removed special case for
uint8[]
that is not needed anymore - 3c8bf84 Replaced all hard-coded PublicKey EOS prefix by global variable instead
- bc63642 Revert "added return_value_data for Trace struct (#163)"
- 9a712dc Second draft for snapshot reader.
- 2d5ba92 Simplify test
- 5692a8f Sync ExtendedAsset with the
eos
codebase. - 8301980 The serialization for
Bool
was aligned with theeos
codebase. Beforehand, it would serialize the value as"true /false"
where it should have been"0 / 1"
. - d702d87 Updated CHANGELOG with previous unmentionned change (required
context.Context
value). - 984fc96 Updated logging to StreamingFast
- b7325cf Updates snapshot reader
- f01c386 Various improvements to public key & signature handling - Avoiding map & for/loop usage when decoding a public key string, this enabled easier override of PublicKeyCompat variable which does not need to update the map. It will be also much faster now since the conditional order will always be the same, ensuring we try PublicKeyCompat first, which is the most occurring case. - Did the same for Signature but mostly for the optimization part here of checking K1 keys first. - Improved checksum checking on public key to perform less allocation which should improve the method.
- 0dd8f77 Working readers for almost all sections of V3 snapshot.
- 3250a49 Working readers for almost all sections of V3 snapshot.
- 0b26536 Wrapped up interface
- 06d05d7 Wrapped up interface
- ba2ce9b add abi.FitNodeos option used to adapt decoding du fit nodeos format
- 4f76b11 add changelog
- b3b900d add context to all API calls
- a418181 add new parameter of the GetTableRows api
- 4b16f8f add proper handling of Float64 values +Inf -Inf
- c029537 add support for decoding binary extension arrays
- 21697b8 add support for packed trx with compresion as boolean, as supported by nodeos
- a183f4c added SendTransactionRaw
- ed8e922 added field decoding via recursion
- bf9faf5 added return_value_data for Trace struct (#163)
- a8a734a added section handler registry to snapshot reader
- 622529b added support for uint128 decimal format
- 22f1741 added support to send_transaction
- bc309dd fix NaN matching and jsonMarshal on Float64 too
- 3ee7b8d fix float64 to fit nodes by setting precision to 17 fit nodes by add field with value
null
when field is mark as optional and value not present - 35bdf3f fix infinite loop in marshalJSON float (last commit)
- 3d8b137 fix json tags for delegatebw action data
- 4a5658d fix non-UTF8 strings in consoleLog
- 8afd609 fix serialization of TimePointSec
- a51457d fix snapshot test and added setcode content
- aa5c086 fix test
- a2d2949 fix typo error
- 56698e2 go mod tidy
- 2adb25b go mod tidy for cleanup
- 5eeeb38 ignoring .DS_Store
- 4a49ef8 more work on handling float64 decoding
- e0c66c2 refactor abi decoder test, added nodeos float32 support and mutil dimensional arrays
- 932d511 remove tableID from ContractRow
- e68eec7 rename ConsoleLog to SafeString, implement as UnmarshalBinary() method
- aafab87 snaphost: exporter NewReader
- a73294e tiny formatting update
- 5ac7382 undo change log