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

SubnetID compatibility with Rust. New spec for f04 address #1

Merged
merged 24 commits into from
Jun 29, 2022

Conversation

adlrocha
Copy link
Owner

@adlrocha adlrocha commented Jun 3, 2022

Working on making SubnetID and f04 addresses compatible with their Rust counterpart living at: https://github.com/filecoin-project/ref-fvm. Adhering to new HC spec: https://github.com/protocol/ConsensusLab/blob/hc/spec/specs/hierarchical_consensus.md

  • SubnetID
  • f04 adress

adlrocha and others added 23 commits June 3, 2022 12:58
This is a pretty common helper library, so we'd like it to work everywhere.
chore: fix test on 32bit and non-cgo platforms
…de-encode

enforce that the trailing bits of an address string are standard
add more tests to TestInvalidStringAddresses
…de-rebase

add more checks and define constants
(officially)
@adlrocha adlrocha marked this pull request as ready for review June 28, 2022 15:45
@adlrocha adlrocha requested a review from dnkolegov June 28, 2022 15:46
@adlrocha adlrocha changed the title SubnetID compatibility with Rust. WIP for f04 hierarchical addr SubnetID compatibility with Rust. New spec for f04 address Jun 28, 2022
address.go Show resolved Hide resolved
hierarchical.go Outdated Show resolved Hide resolved
address.go Show resolved Hide resolved
@github-actions
Copy link

Suggested version: v1.0.0
Comparing to: v0.0.6 (diff)

Changes in go.mod file(s):

diff --git a/go.mod b/go.mod
index bd06a91..371755c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/filecoin-project/go-address
 
-go 1.13
+go 1.17
 
 require (
 	github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03
@@ -12,3 +12,23 @@ require (
 	github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291
 	golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
 )
+
+require (
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/ipfs/go-block-format v0.0.2 // indirect
+	github.com/ipfs/go-cid v0.0.6 // indirect
+	github.com/ipfs/go-ipfs-util v0.0.1 // indirect
+	github.com/ipfs/go-ipld-format v0.0.1 // indirect
+	github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect
+	github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 // indirect
+	github.com/mr-tron/base58 v1.1.3 // indirect
+	github.com/multiformats/go-base32 v0.0.3 // indirect
+	github.com/multiformats/go-base36 v0.1.0 // indirect
+	github.com/multiformats/go-multibase v0.0.3 // indirect
+	github.com/multiformats/go-multihash v0.0.13 // indirect
+	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/spaolacci/murmur3 v1.1.0 // indirect
+	golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
+	golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect
+	gopkg.in/yaml.v2 v2.2.4 // indirect
+)

gorelease says:

# github.com/filecoin-project/go-address
## incompatible changes
MaxAddressStringLength: value changed from 86 to 232
## compatible changes
Address.PrettyPrint: added
Address.RawAddr: added
Address.Subnet: added
ErrInvalidEncoding: added
ErrNotHierarchical: added
HCAddrSeparator: added
Hierarchical: added
HierarchicalLength: added
MaxInt64StringLength: added
NewHCAddress: added
NewSubnetID: added
RootStr: added
RootSubnet: added
SubnetID: added
SubnetIDFromString: added
SubnetSeparator: added
UndefStr: added
UndefSubnetID: added

# github.com/filecoin-project/go-address/gen
## compatible changes
package added

# summary
Suggested version: v0.1.0

gocompat says:

(empty)

@adlrocha adlrocha merged commit 9a4be37 into master Jun 29, 2022
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.

6 participants