Skip to content

Support backward compatibility with older consensus payloads for seed nodes#610

Closed
jsolman wants to merge 1 commit intoconsensus/improved_dbftfrom
consensus/fix_compatibility
Closed

Support backward compatibility with older consensus payloads for seed nodes#610
jsolman wants to merge 1 commit intoconsensus/improved_dbftfrom
consensus/fix_compatibility

Conversation

@jsolman
Copy link
Copy Markdown
Contributor

@jsolman jsolman commented Feb 26, 2019

Changes for dBFT 2.0 need to be able to run on seed nodes before the CN nodes are upgraded. This fixes incompatibilities staying connected to other nodes in the network when running in a network where the CN nodes are running the original dBFT implementation.

This was referenced Feb 26, 2019
@jsolman jsolman requested a review from erikzhang February 26, 2019 03:08
@erikzhang
Copy link
Copy Markdown
Member

Modifying Version is also a way, but generally I only do this when there is no other way.

@erikzhang
Copy link
Copy Markdown
Member

Otherwise, after a while, our code will look like this:

writer.Write(Version);
if (Version > 0)
{
    writer.Write(PrevHash);
}
else
{
    writer.Write(BlockIndex);
    writer.Write(ValidatorIndex);
}
if (Version == 2)
{
    writer.Write(0);
}
if (Version >= 2)
{
    writer.WriteVarBytes(Data);
}
if (Version >= 3)
{

}

@jsolman
Copy link
Copy Markdown
Contributor Author

jsolman commented Feb 26, 2019

Otherwise, after a while, our code will look...

In Neo 3.0 when starting from a new Genesis block we can get rid of handling of prior versions.

@jsolman
Copy link
Copy Markdown
Contributor Author

jsolman commented Feb 26, 2019

I think in this case upping the version is necessary.

@jsolman
Copy link
Copy Markdown
Contributor Author

jsolman commented Feb 26, 2019

Closing in favor of #609

@jsolman jsolman closed this Feb 26, 2019
@erikzhang erikzhang deleted the consensus/fix_compatibility branch March 8, 2019 03:55
Thacryba pushed a commit to simplitech/neo that referenced this pull request Feb 17, 2020
* 2.9.0

* updates for 2.9.0

* Update v2.9.0.md (neo-project#610)

Adjustment for instruction of getting nep-5 applicationlog.

* Update invokescript.md (neo-project#613)

Add tx

* Update invokefunction.md (neo-project#612)

Add tx for response.

* Create getwalletheight (neo-project#611)

Add getwalletheight api.

* updates for 2.9.0

* minor updates

* Update setup.md (neo-project#617)

Add introduction of Plugins.

* Update v2.9.0.md (neo-project#615)

Add introduction for setting config.json

* final updates

* Update v2.9.0.md (neo-project#618)

Add notes for install plugins.

* plugin related
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.

2 participants